diff --git a/polybar/config.ini b/polybar/config.ini index 4563bb7..76f5de0 100644 --- a/polybar/config.ini +++ b/polybar/config.ini @@ -59,7 +59,7 @@ font-3 = Material:size=13;2 ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- modules-left = dateL date dateR space timeL time timeR 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 ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- diff --git a/polybar/left_roundy.ini b/polybar/left_roundy.ini index 926e100..9b03dd9 100644 --- a/polybar/left_roundy.ini +++ b/polybar/left_roundy.ini @@ -19,7 +19,7 @@ content-background = ${colors.background} content-foreground = ${colors.modback} content = "%{T2}%{T-}" -[module/blueL] +[module/sysiconL] type = custom/text content-background = ${colors.background} content-foreground = ${colors.modback} diff --git a/polybar/right_roundy.ini b/polybar/right_roundy.ini index 2beb71f..0126e53 100644 --- a/polybar/right_roundy.ini +++ b/polybar/right_roundy.ini @@ -19,7 +19,7 @@ content-background = ${colors.background} content-foreground = ${colors.modback} content = "%{T2}%{T-}" -[module/blueR] +[module/sysiconR] type = custom/text content-background = ${colors.sepback} content-foreground = ${colors.modback} @@ -31,12 +31,6 @@ content-background = ${colors.sepback} content-foreground = ${colors.modback} content = "%{T2}%{T-}" -[module/left3] -type = custom/text -content-background = ${colors.background} -content-foreground = ${colors.modback} -content = "%{T2}%{T-}" - [module/powerR] type = custom/text content-background = ${colors.background} diff --git a/polybar/scripts/dnd.sh b/polybar/scripts/dnd.sh new file mode 100644 index 0000000..1fdbec4 --- /dev/null +++ b/polybar/scripts/dnd.sh @@ -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 diff --git a/polybar/scripts/toggle_dnd.sh b/polybar/scripts/toggle_dnd.sh new file mode 100644 index 0000000..8024896 --- /dev/null +++ b/polybar/scripts/toggle_dnd.sh @@ -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 diff --git a/polybar/scripts/update_check.sh b/polybar/scripts/update_check.sh index 045f135..4926390 100644 --- a/polybar/scripts/update_check.sh +++ b/polybar/scripts/update_check.sh @@ -2,7 +2,7 @@ b=$(pacman -Qu | wc -l) -if [[ "$b" -ne "0" ]]; then +if [ "$b" != "0" ]; then echo " "; else echo ""; diff --git a/polybar/user_modules.ini b/polybar/user_modules.ini index 04964d3..b0264f9 100644 --- a/polybar/user_modules.ini +++ b/polybar/user_modules.ini @@ -43,6 +43,20 @@ scroll-up = playerctl --player=spotify next 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 ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-