mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-24 13:22:23 +00:00
add gpuinfo window and top window
This commit is contained in:
parent
262179e1a6
commit
99cfc82a43
6 changed files with 19 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"optOut": false,
|
||||
"lastUpdateCheck": 1589203310918
|
||||
"lastUpdateCheck": 1589407237422
|
||||
}
|
|
@ -136,8 +136,9 @@ label-mounted = %percentage_used%%
|
|||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format-prefix = "%{F#fe8019}%{F-} "
|
||||
format-prefix = "%{A1:~/.config/polybar/polybar-scripts/toggle_gpuinfo_window.sh 'top':}%{F#fe8019}%{F-} %{A}"
|
||||
label = %percentage:2%%
|
||||
click-left = ""
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
|
@ -203,6 +204,7 @@ interval = 600
|
|||
type = custom/script
|
||||
exec = "sudo ~/scripts/gpuinfo.sh"
|
||||
format = "%{F#d3869b}%{T3}%{T-}%{F-} <label>"
|
||||
click-left = "~/.config/polybar/polybar-scripts/toggle_gpuinfo_window.sh 'sudo /home/leon/scripts/gpuinfo.sh --watch'"
|
||||
interval = 2
|
||||
|
||||
[module/pulseaudio-control]
|
||||
|
|
7
files/.config/polybar/polybar-scripts/toggle_gpuinfo_window.sh
Executable file
7
files/.config/polybar/polybar-scripts/toggle_gpuinfo_window.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -n $(xdotool search --class bar_system_status_indicator) ]]; then
|
||||
xdotool search --class bar_system_status_indicator windowkill &
|
||||
else
|
||||
termite --class bar_system_status_indicator -e "$1" &
|
||||
fi
|
Binary file not shown.
|
@ -378,6 +378,7 @@ myManageHook = composeAll
|
|||
, className =? "mpv" --> ManageHelpers.doRectFloat (W.RationalRect 0.9 0.9 0.1 0.1)
|
||||
, title =? "Something" --> doFloat
|
||||
, className =? "termite_floating" --> ManageHelpers.doRectFloat(W.RationalRect 0.2 0.2 0.6 0.6)
|
||||
, className =? "bar_system_status_indicator" --> ManageHelpers.doRectFloat (W.RationalRect 0.7 0.05 0.29 0.26)
|
||||
-- , isFullscreen --> doF W.focusDown <+> doFullFloat
|
||||
, manageDocks
|
||||
, namedScratchpadManageHook scratchpads
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/dash
|
||||
#sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info
|
||||
|
||||
sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info \
|
||||
|
||||
if [ "$1" = "--watch" ]; then
|
||||
sudo watch --no-title -n 0.5 "cat /sys/kernel/debug/dri/0/amdgpu_pm_info | grep -A 10 'GFX Clocks and Power'"
|
||||
else
|
||||
sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info \
|
||||
| sed -n 's/^GPU Load: \(.*\)$/\1/gp'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue