added picom toggle/status modules to polybar
This commit is contained in:
10
.config/picom/toggle.sh
Executable file
10
.config/picom/toggle.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if pgrep -x picom
|
||||||
|
then
|
||||||
|
pkill picom
|
||||||
|
else
|
||||||
|
picom &>/dev/null &
|
||||||
|
fi
|
||||||
|
|
||||||
|
polybar-msg action picom-status hook 0
|
||||||
@@ -83,7 +83,7 @@ separator-foreground = ${colors.red}
|
|||||||
font-0 = JetBrains Mono Nerd Font:size=12;4
|
font-0 = JetBrains Mono Nerd Font:size=12;4
|
||||||
|
|
||||||
modules-left = xworkspaces xwindow
|
modules-left = xworkspaces xwindow
|
||||||
modules-right = pulseaudio battery memory cpu wlan eth date
|
modules-right = picom-status pulseaudio battery memory cpu wlan eth date
|
||||||
|
|
||||||
cursor-click = pointer
|
cursor-click = pointer
|
||||||
cursor-scroll = ns-resize
|
cursor-scroll = ns-resize
|
||||||
@@ -217,4 +217,12 @@ label = %{F#F9e2af} %{F-} %{F#a6e3a1}%time% %date%%{F-}
|
|||||||
screenchange-reload = true
|
screenchange-reload = true
|
||||||
pseudo-transparency = true
|
pseudo-transparency = true
|
||||||
|
|
||||||
|
[module/picom-status]
|
||||||
|
type = custom/script
|
||||||
|
exec = ~/.config/polybar/picom_status.sh
|
||||||
|
hook-0 = ~/.config/polybar/picom_status.sh
|
||||||
|
interval = 0
|
||||||
|
click-left = $HOME/.config/picom/toggle.sh
|
||||||
|
|
||||||
; vim:ft=dosini
|
; vim:ft=dosini
|
||||||
|
|
||||||
|
|||||||
6
.config/polybar/picom_status.sh
Executable file
6
.config/polybar/picom_status.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if pgrep -x "picom" > /dev/null; then
|
||||||
|
echo "Picom: ON"
|
||||||
|
else
|
||||||
|
echo "Picom: OFF"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user