add gpu to polybar

This commit is contained in:
Leon Kowarschick 2020-05-13 23:16:13 +02:00
parent 099e5663d9
commit 262179e1a6
7 changed files with 37 additions and 23 deletions

View file

@ -3,13 +3,13 @@
Xcursor.size: 16
Xcursor.theme: capitaine-cursors-light
!Xft.autohint: 0
!Xft.antialias: 1
!Xft.hinting: true
!Xft.hintstyle: hintslight
!Xft.dpi: 96
!Xft.rgba: rgb
!Xft.lcdfilter: lcddefault
Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
rofi.lines: 5
rofi.eh: 2

View file

@ -311,8 +311,8 @@ font:
normal: # >>= >=
#family: JetBrainsMono Nerd Font
#family: Iosevka
family: cozette
#family: Terminus (TTF)
#family: cozette
family: Terminus (TTF)
#family: cherry
#family: lucy tewi2a
#family: Scientifica

View file

@ -41,7 +41,6 @@ end
function c
set -l result (/home/leon/scripts/conf)
commandline -r "$result"
commandline -f repaint
commandline -f execute
end

View file

@ -102,13 +102,14 @@ font-0 = "cherry:size=12;2"
;font-0 = "cozette:size=10;2"
font-1 = "Symbola:size=8;1"
font-2 = "FontAwesome5Free:style=Solid:size=8;2"
font-3 = "Iosevka Nerd Font:size=17;4"
font-3 = "Iosevka Nerd Font:size=10;2"
;font-4 = "Iosevka Nerd Font:size=17;4"
;font-1 = "FontAwesome:fontformat=truetype:size=12;1"
modules-left = xmonad
modules-center = timerDisplay spotify gitlab-pipeline player-mpv-tail time
modules-right = pulseaudio-control updates-arch filesystem memory cpu date
modules-right = pulseaudio-control updates-arch gpuinfo filesystem memory cpu date
tray-position = ${env:TRAY_POSITION:right}
tray-padding = 2
@ -197,6 +198,13 @@ type = custom/script
exec = ~/.config/polybar/polybar-scripts/updates-arch-combined.sh
interval = 600
[module/gpuinfo]
type = custom/script
exec = "sudo ~/scripts/gpuinfo.sh"
format = "%{F#d3869b}%{T3}%{T-}%{F-} <label>"
interval = 2
[module/pulseaudio-control]
type = custom/script
tail = true

View file

@ -3,11 +3,16 @@
format_workspaces() {
while read -r line; do
echo "$line" \
| sed 's/__active__/⬤/g' \
| sed 's/__urgent__/⬤/g' \
| sed 's/__hidden__/⬤/g' \
| sed 's/__empty__/⭕/g' \
| perl -pe 's/((?:%{F#888974*?}%{A1:.*} __empty__ %{A}%{F-} ?)*)(?!.*\1)//g'
| sed 's/__active__/◆/g' \
| sed 's/__urgent__/◆/g' \
| sed 's/__hidden__/◆/g' \
| sed 's/__empty__/◇/g' \
#| sed 's/__active__/⬤/g' \
#| sed 's/__urgent__/⬤/g' \
#| sed 's/__hidden__/⬤/g' \
#| sed 's/__empty__/⭕/g' \
#| perl -pe 's/((?:%{F#888974*?}%{A1:.*} __empty__ %{A}%{F-} ?)*)(?!.*\1)//g'
done
}
@ -16,13 +21,9 @@ format_workspaces() {
if [ "$MONITOR" = "HDMI-A-0" ]; then
#while true; do
tail -F /tmp/xmonad-state-bar0 | stdbuf -o0 cat | format_workspaces
#done
else
#while true; do
tail -F /tmp/xmonad-state-bar1 | stdbuf -o0 cat | format_workspaces
#done
tail -F /tmp/xmonad-state-bar1 | stdbuf -o0 cat | format_workspaces
fi
#while true; do

View file

@ -0,0 +1,3 @@
#!/bin/dash
curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash

View file

@ -1,2 +1,5 @@
#!/bin/dash
sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info
#sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info
sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info \
| sed -n 's/^GPU Load: \(.*\)$/\1/gp'