add nvidia smi to polybar
This commit is contained in:
@@ -22,7 +22,7 @@ border-bottom-color = ${colors.background}
|
||||
|
||||
modules-left = i3 empty-space title
|
||||
modules-center = time
|
||||
modules-right = empty-space spotify empty-space backlight empty-space audio empty-space cpu empty-space temperature empty-space memory empty-space battery empty-space arrow
|
||||
modules-right = empty-space spotify empty-space backlight empty-space audio empty-space gpu cpu empty-space temperature empty-space memory empty-space battery empty-space arrow
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
@@ -107,6 +107,19 @@ format-foreground = ${colors.sapphire}
|
||||
|
||||
# =======================================
|
||||
|
||||
[module/gpu]
|
||||
type = custom/script
|
||||
exec = $HOME/.config/polybar/scripts/gpu.sh
|
||||
interval = 0.5
|
||||
tail = true
|
||||
format = <label>
|
||||
label = "%output%% "
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.green}
|
||||
format-foreground = ${colors.green}
|
||||
|
||||
# =======================================
|
||||
|
||||
[module/temperature]
|
||||
type = custom/script
|
||||
exec = sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '[0-9]*.[0-9]*°C' -o
|
||||
|
||||
1
common/.config/polybar/scripts/gpu.sh
Executable file
1
common/.config/polybar/scripts/gpu.sh
Executable file
@@ -0,0 +1 @@
|
||||
nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | awk '{printf "%02d\n", $1}'
|
||||
Reference in New Issue
Block a user