1
0
Fork 0

added check to custom polybar modules

This commit is contained in:
Massaki Archambault 2018-09-11 14:53:54 -04:00
parent fcdfb47b0d
commit 697d25ae0a
4 changed files with 26 additions and 19 deletions

View File

@ -1,14 +1,16 @@
#!/bin/bash #!/bin/bash
if rfkill list bluetooth | grep "yes" >/dev/null; then if which rfkill >/dev/null && [[ -f /dev/rfkill ]]; then
if [[ "$1" == "toggle" ]]; then if rfkill list bluetooth | grep "yes" >/dev/null; then
rfkill unblock bluetooth if [[ "$1" == "toggle" ]]; then
fi rfkill unblock bluetooth
echo "$ICO_BLU_OFF" fi
else echo "$ICO_BLU_OFF"
if [[ "$1" == "toggle" ]]; then else
rfkill block bluetooth if [[ "$1" == "toggle" ]]; then
fi rfkill block bluetooth
echo "$ICO_BLU_ON" fi
echo "$ICO_BLU_ON"
fi
fi fi

View File

@ -1,7 +1,10 @@
#!/bin/bash #!/bin/bash
if ! pgrep "openvpn" &>/dev/null || ! ip link | grep -q tun; then if which openvpn >/dev/null; then
echo "$ICO_VPN_OFF " if ! pgrep "openvpn" &>/dev/null || ! ip link | grep -q tun; then
else echo "$ICO_VPN_OFF "
echo "$ICO_VPN_ON " else
echo "$ICO_VPN_ON "
fi
fi fi

View File

@ -1,8 +1,10 @@
#!/bin/bash #!/bin/bash
if rfkill list wifi | grep "yes" >/dev/null; then if which rfkill >/dev/null && [[ -f /dev/rfkill ]]; then
rfkill unblock wifi if rfkill list wifi | grep "yes" >/dev/null; then
else rfkill unblock wifi
rfkill block wifi else
rfkill block wifi
fi
fi fi

View File

@ -9,7 +9,7 @@ export EDITOR=nvim
export PAGER=less export PAGER=less
# motd # motd
export MOTD_SERVICES="$MOTD_SERVICES docker.socket libvirtd" export MOTD_SERVICES="$MOTD_SERVICES docker.socket"
# firefox # firefox
export MOZ_USE_XINPUT2=1 export MOZ_USE_XINPUT2=1