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

View File

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