diff --git a/polybar/config.ini b/polybar/config.ini index 76f5de0..2806bf6 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 = sysiconL dnd updates network bluetooth sysiconR space1 volumeL volume volumeR space2 powerL power powerR +modules-right = sysiconL dnd updates network bluetooth sysiconR space1 volumeL mic volume volumeR space2 powerL power powerR ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- diff --git a/polybar/scripts/bluetooth.sh b/polybar/scripts/bluetooth.sh index bd111a5..e0861fd 100755 --- a/polybar/scripts/bluetooth.sh +++ b/polybar/scripts/bluetooth.sh @@ -1,4 +1,5 @@ #!/bin/sh + if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ] then echo "%{F#666}" diff --git a/polybar/scripts/mic.sh b/polybar/scripts/mic.sh new file mode 100755 index 0000000..4b5aec3 --- /dev/null +++ b/polybar/scripts/mic.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +value=$(amixer get Capture | grep '\[off\]') + +if [ "$value" == "" ]; then + echo " "; +else + echo "%{F#666} "; +fi diff --git a/polybar/scripts/toggle_bluetooth.sh b/polybar/scripts/toggle_bluetooth.sh index dffb663..f82de94 100755 --- a/polybar/scripts/toggle_bluetooth.sh +++ b/polybar/scripts/toggle_bluetooth.sh @@ -1,5 +1,8 @@ #!/bin/sh -if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ] + +value=$(bluetoothctl show | grep "Powered: yes" | wc -c) + +if [ "$value" == 0 ] then bluetoothctl power on else diff --git a/polybar/scripts/toggle_dnd.sh b/polybar/scripts/toggle_dnd.sh index 8024896..199b8d8 100644 --- a/polybar/scripts/toggle_dnd.sh +++ b/polybar/scripts/toggle_dnd.sh @@ -2,8 +2,7 @@ value=$(gsettings get org.gnome.desktop.notifications show-banners) -if [ $value == "true" ] -then +if [ "$value" == "true" ]; then gsettings set org.gnome.desktop.notifications show-banners false else gsettings set org.gnome.desktop.notifications show-banners true diff --git a/polybar/scripts/update_check.sh b/polybar/scripts/update_check.sh index 4926390..e7f6031 100644 --- a/polybar/scripts/update_check.sh +++ b/polybar/scripts/update_check.sh @@ -1,8 +1,8 @@ #!/bin/sh -b=$(pacman -Qu | wc -l) +value=$(pacman -Qu | wc -l) -if [ "$b" != "0" ]; then +if [ "$value" != "0" ]; then echo " "; else echo ""; diff --git a/polybar/user_modules.ini b/polybar/user_modules.ini index b0264f9..f165018 100644 --- a/polybar/user_modules.ini +++ b/polybar/user_modules.ini @@ -26,6 +26,16 @@ label = "%time%" format-background = ${colors.modback} +;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +;; WEATHER +;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- +[module/weather] +type = custom/script +exec = ~/.config/polybar/scripts/weather-plugin.sh +tail = false +interval = 960 + + ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- ;; SPOTIFY ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- @@ -54,7 +64,7 @@ format-background = ${colors.modback} ;format-padding = 1 exec = bash ~/.config/polybar/scripts/dnd.sh -click-left = exec bash ~/.config/polybar/scripts/toggle_dnd.sh +click-left = bash ~/.config/polybar/scripts/toggle_dnd.sh ;;_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- @@ -70,7 +80,7 @@ format-background = ${colors.modback} format =