do not disturb and minor fixes

This commit is contained in:
Michał Gdula 2022-04-22 10:17:32 +01:00
parent 1a384d0cd5
commit a4a0fed7d1
7 changed files with 38 additions and 10 deletions

View file

@ -59,7 +59,7 @@ font-3 = Material:size=13;2
;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
modules-left = dateL date dateR space timeL time timeR modules-left = dateL date dateR space timeL time timeR
modules-center = spotifyL spotify spotifyR modules-center = spotifyL spotify spotifyR
modules-right = blueL updates network bluetooth blueR space1 volumeL volume volumeR space2 powerL power powerR modules-right = sysiconL dnd updates network bluetooth sysiconR space1 volumeL volume volumeR space2 powerL power powerR
;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-

View file

@ -19,7 +19,7 @@ content-background = ${colors.background}
content-foreground = ${colors.modback} content-foreground = ${colors.modback}
content = "%{T2}%{T-}" content = "%{T2}%{T-}"
[module/blueL] [module/sysiconL]
type = custom/text type = custom/text
content-background = ${colors.background} content-background = ${colors.background}
content-foreground = ${colors.modback} content-foreground = ${colors.modback}

View file

@ -19,7 +19,7 @@ content-background = ${colors.background}
content-foreground = ${colors.modback} content-foreground = ${colors.modback}
content = "%{T2}%{T-}" content = "%{T2}%{T-}"
[module/blueR] [module/sysiconR]
type = custom/text type = custom/text
content-background = ${colors.sepback} content-background = ${colors.sepback}
content-foreground = ${colors.modback} content-foreground = ${colors.modback}
@ -31,12 +31,6 @@ content-background = ${colors.sepback}
content-foreground = ${colors.modback} content-foreground = ${colors.modback}
content = "%{T2}%{T-}" content = "%{T2}%{T-}"
[module/left3]
type = custom/text
content-background = ${colors.background}
content-foreground = ${colors.modback}
content = "%{T2}%{T-}"
[module/powerR] [module/powerR]
type = custom/text type = custom/text
content-background = ${colors.background} content-background = ${colors.background}

10
polybar/scripts/dnd.sh Normal file
View file

@ -0,0 +1,10 @@
#!/bin/sh
value=$(gsettings get org.gnome.desktop.notifications show-banners)
if [ $value == "true" ]; then
#echo "%{F#666} " # Icon toggle
echo "" # Icon only when do not distrub is on
elif [ $value == "false" ]; then
echo " "
fi

View file

@ -0,0 +1,10 @@
#!/bin/sh
value=$(gsettings get org.gnome.desktop.notifications show-banners)
if [ $value == "true" ]
then
gsettings set org.gnome.desktop.notifications show-banners false
else
gsettings set org.gnome.desktop.notifications show-banners true
fi

View file

@ -2,7 +2,7 @@
b=$(pacman -Qu | wc -l) b=$(pacman -Qu | wc -l)
if [[ "$b" -ne "0" ]]; then if [ "$b" != "0" ]; then
echo " "; echo " ";
else else
echo ""; echo "";

View file

@ -43,6 +43,20 @@ scroll-up = playerctl --player=spotify next
scroll-down = playerctl --player=spotify previous scroll-down = playerctl --player=spotify previous
;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
;; DND
;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
[module/dnd]
type = custom/script
interval = 1
format-background = ${colors.modback}
;format-padding = 1
exec = bash ~/.config/polybar/scripts/dnd.sh
click-left = exec bash ~/.config/polybar/scripts/toggle_dnd.sh
;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
;; UPDATES ;; UPDATES
;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-