summaryrefslogtreecommitdiff
path: root/.local/bin/dwmbar
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2020-10-26 00:38:53 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2020-10-26 00:38:53 -0400
commitbdbd07823796973d11536dc05dc1cf7bb11f2341 (patch)
treedc09fed7f0f5bc9e7e6d6035c6856d1bd6befdb2 /.local/bin/dwmbar
parent7879ffd66844128ccb20dd6b763658e1016856fe (diff)
moving to pia as a vpn provider
Diffstat (limited to '.local/bin/dwmbar')
-rwxr-xr-x.local/bin/dwmbar/dwmb-date1
-rwxr-xr-x.local/bin/dwmbar/dwmb-dotfiles4
-rwxr-xr-x.local/bin/dwmbar/dwmb-vpn32
3 files changed, 26 insertions, 11 deletions
diff --git a/.local/bin/dwmbar/dwmb-date b/.local/bin/dwmbar/dwmb-date
index cb6a54b..1943f10 100755
--- a/.local/bin/dwmbar/dwmb-date
+++ b/.local/bin/dwmbar/dwmb-date
@@ -3,5 +3,6 @@
date +"  %a %b %d "
case $BLOCK_BUTTON in
+ 1) notify-send -a " Calendar" "$(cal | tail -n +2)" ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
diff --git a/.local/bin/dwmbar/dwmb-dotfiles b/.local/bin/dwmbar/dwmb-dotfiles
index c728a41..aca2727 100755
--- a/.local/bin/dwmbar/dwmb-dotfiles
+++ b/.local/bin/dwmbar/dwmb-dotfiles
@@ -14,5 +14,7 @@ fi
echo " $warn "
case $BLOCK_BUTTON in
+ 1) $TERMINAL -c dropdown -e yadm diff ;;
+ 3) $TERMINAL -c dropdown -e dfup ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
-esac \ No newline at end of file
+esac
diff --git a/.local/bin/dwmbar/dwmb-vpn b/.local/bin/dwmbar/dwmb-vpn
index e08e6d6..9ddb5b5 100755
--- a/.local/bin/dwmbar/dwmb-vpn
+++ b/.local/bin/dwmbar/dwmb-vpn
@@ -1,19 +1,29 @@
#!/bin/bash
# Outputs if Express VPN is connected or not
-vpnstatus=$(expressvpn status | head -n 1)
+vpnstatus="$(piactl get connectionstate)"
case "$vpnstatus" in
- *"Not"*) icon=""
- ;;
- *"Connected"*) icon=""
- ;;
- *"Connecting"*) icon=" "
- ;;
- *) icon=""
+ Disconnected) icon=" " ;;
+ Connecting) icon="  " ;;
+ Connected) icon=" " ;;
+ Interrupted) icon="  " ;;
+ Reconnecting) icon="  " ;;
+ DisconnectingToReconnect) icon="  ";;
+ Disconnecting) icon="  " ;;
esac
-echo " $icon "
+# case "$vpnstatus" in
+# *"Not"*) icon=""
+# ;;
+# *"Connected"*) icon=""
+# ;;
+# *"Connecting"*) icon=" "
+# ;;
+# *) icon=""
+# esac
+
+echo " $icon"
# \033]01;31\] # pink
@@ -24,6 +34,8 @@ echo " $icon "
# \033]01;33\] # bold yellow
# s/onnected\sto\s//;
case $BLOCK_BUTTON in
- 1) ~/.local/bin/vpnmenu ;;
+ 1) piactl connect && notify-send -a "VPN" "Connected" && kill -36 $(pidof dwmblocks);;
+ 2) vpnmenu ;;
+ 3) piactl disconnect && notify-send -a "VPN" "Disonnected" && kill -36 $(pidof dwmblocks);;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac