Added GPU usage to bar

This commit is contained in:
Trianta 2024-01-21 00:12:07 -06:00
parent 2b3af41d33
commit 7f0928ddf9
2 changed files with 18 additions and 5 deletions

View File

@ -15,6 +15,7 @@
"disk", "disk",
"memory", "memory",
"cpu", "cpu",
"custom/gpu",
"temperature" "temperature"
], ],
"modules-center": ["hyprland/workspaces"], "modules-center": ["hyprland/workspaces"],
@ -26,13 +27,14 @@
"custom/poweroff" "custom/poweroff"
], ],
"clock": { "clock": {
"interval": 1, "interval": 60,
"format": "<b>{:%H:%M:%S}</b>", "format": "<b>{:%H:%M:%S}</b>",
"format-alt": "{:%Y-%m-%d}", "format-alt": "{:%Y-%m-%d}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>" "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
}, },
"cpu": { "cpu": {
"format": " {usage}%", "format": " {usage}%",
"interval": 5,
"tooltip": false "tooltip": false
}, },
"disk": { "disk": {
@ -51,10 +53,11 @@
"tooltip-format": "{used:0.1f}G / {total:0.1f}G used" "tooltip-format": "{used:0.1f}G / {total:0.1f}G used"
}, },
"temperature": { "temperature": {
"critical-threshold": 80,
"format": "{icon} {temperatureC}°C ", "format": "{icon} {temperatureC}°C ",
"format-icons": ["", "", "", "", ""], "format-icons": ["", "", "", "", ""],
"hwmon-path": "/sys/class/thermal/thermal_zone2/temp" "hwmon-path": "/sys/class/thermal/thermal_zone2/temp",
"critical-threshold": 80,
"interval": 5
}, },
"network#ethernet": { "network#ethernet": {
"interface": "enp*", "interface": "enp*",
@ -100,6 +103,12 @@
"icon-size": 21, "icon-size": 21,
"spacing": 10 "spacing": 10
}, },
"custom/gpu": {
"format": "󰔂 {}%",
"interval": 5,
"tooltip": false,
"exec": "nvidia-smi --query | grep Gpu | tail -1 | awk '{print $3}'"
},
"custom/poweroff": { "custom/poweroff": {
"tooltip": false, "tooltip": false,
"format": " ", "format": " ",

View File

@ -45,6 +45,7 @@ window#waybar.hidden {
#tray, #tray,
#workspaces, #workspaces,
#wireplumber, #wireplumber,
#custom-gpu,
#custom-poweroff, #custom-poweroff,
#custom-weather { #custom-weather {
padding: 0 10px; padding: 0 10px;
@ -60,7 +61,10 @@ window#waybar.hidden {
color: @teal; color: @teal;
} }
#cpu { #cpu {
color: @lavender; color: @yellow;
}
#custom-gpu {
color: @pink;
} }
#temperature { #temperature {
color: @sky; color: @sky;