Polybar Mic button and cleaning up code

This commit is contained in:
Michał Gdula 2022-04-26 23:20:46 +01:00
parent 3b2fca577a
commit 54b578567c
7 changed files with 44 additions and 9 deletions

View file

@ -1,4 +1,5 @@
#!/bin/sh
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
then
echo "%{F#666}"

9
polybar/scripts/mic.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
value=$(amixer get Capture | grep '\[off\]')
if [ "$value" == "" ]; then
echo " ";
else
echo "%{F#666} ";
fi

View file

@ -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

View file

@ -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

View file

@ -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 "";