diff options
author | Roger Gonzalez <roger@rogs.me> | 2024-08-12 11:52:54 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2024-08-12 11:52:54 -0300 |
commit | 29888c91c0acfffa7ffa54266c53d5735843bc0c (patch) | |
tree | b8bee05f8928f6f96db743a861b6b7bdd84d8092 /.config/polybar | |
parent | 1ed5dbf4d1855cab45d5b2b79ff5d6b110ed0271 (diff) |
Added dnd and protonvpn to polybar
Diffstat (limited to '.config/polybar')
-rw-r--r-- | .config/polybar/config | 7 | ||||
-rwxr-xr-x | .config/polybar/dnd_status.sh | 11 | ||||
-rwxr-xr-x | .config/polybar/protonvpn_status.sh | 11 |
3 files changed, 28 insertions, 1 deletions
diff --git a/.config/polybar/config b/.config/polybar/config index e05f08bc..3f035d54 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -35,7 +35,7 @@ font-4 = FontAwesome:size=10;0 font-5 = Noto Color Emoji:scale=12;0 modules-left = i3 music modules-center = xwindow -modules-right = pulseaudio xkeyboard cpu memory wireless-network protonvpn-status battery clock +modules-right = pulseaudio xkeyboard cpu memory wireless-network protonvpn-status dnd battery clock [module/i3] @@ -141,6 +141,11 @@ type = custom/script exec = /home/roger/.config/polybar/protonvpn_status.sh interval = 5 +[module/dnd] +type = custom/script +exec = /home/roger/.config/polybar/dnd_status.sh +interval = 1 + [module/cpu-temperature] type = internal/temperature interval = 0.5 diff --git a/.config/polybar/dnd_status.sh b/.config/polybar/dnd_status.sh new file mode 100755 index 00000000..c4e798c7 --- /dev/null +++ b/.config/polybar/dnd_status.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +STATE=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb) + +if [ "$STATE" = "true" ]; then + echo "DND ✅" +else + echo "DND ❌" +fi diff --git a/.config/polybar/protonvpn_status.sh b/.config/polybar/protonvpn_status.sh new file mode 100755 index 00000000..1e2b90a4 --- /dev/null +++ b/.config/polybar/protonvpn_status.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +PROTONVPN_STATUS=$(curl -s https://am.i.mullvad.net/country) + +if echo $PROTONVPN_STATUS | grep -q 'Uruguay'; then + echo "%{u#f90000}VPN %{T5}🚫%{T-}" + else + echo "%{u#75d85a}VPN %{T5}✅%{T-}" +fi |