diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-17 02:01:11 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-17 02:01:11 -0400 |
commit | d427693f43ba211e35f18adc877f5df48e4724db (patch) | |
tree | 51d25a2b70c14644c1c07a366d5b75740d4017e7 | |
parent | eec12916e3b113825420c3e6731f87b770487245 (diff) |
Add clickable elements to dwmblocks scripts
-rwxr-xr-x | .local/bin/dwmbar/dwmb-date | 4 | ||||
-rwxr-xr-x | .local/bin/dwmbar/dwmb-dotfiles | 3 | ||||
-rwxr-xr-x | .local/bin/dwmbar/dwmb-layout | 3 | ||||
-rwxr-xr-x | .local/bin/dwmbar/dwmb-news | 4 | ||||
-rwxr-xr-x | .local/bin/dwmbar/dwmb-test | 3 | ||||
-rwxr-xr-x | .local/bin/dwmbar/dwmb-vpn | 8 |
6 files changed, 23 insertions, 2 deletions
diff --git a/.local/bin/dwmbar/dwmb-date b/.local/bin/dwmbar/dwmb-date index 9f2d485..cb6a54b 100755 --- a/.local/bin/dwmbar/dwmb-date +++ b/.local/bin/dwmbar/dwmb-date @@ -1,3 +1,7 @@ #!/bin/sh date +" %a %b %d " + +case $BLOCK_BUTTON in + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac diff --git a/.local/bin/dwmbar/dwmb-dotfiles b/.local/bin/dwmbar/dwmb-dotfiles index 0b6eafe..c728a41 100755 --- a/.local/bin/dwmbar/dwmb-dotfiles +++ b/.local/bin/dwmbar/dwmb-dotfiles @@ -13,3 +13,6 @@ fi echo " $warn " +case $BLOCK_BUTTON in + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac
\ No newline at end of file diff --git a/.local/bin/dwmbar/dwmb-layout b/.local/bin/dwmbar/dwmb-layout index 3cd1132..47e2dec 100755 --- a/.local/bin/dwmbar/dwmb-layout +++ b/.local/bin/dwmbar/dwmb-layout @@ -1,3 +1,6 @@ #!/bin/sh echo " $(cat $HOME/.cache/layout) " +case $BLOCK_BUTTON in + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac
\ No newline at end of file diff --git a/.local/bin/dwmbar/dwmb-news b/.local/bin/dwmbar/dwmb-news index 4a33702..4318040 100755 --- a/.local/bin/dwmbar/dwmb-news +++ b/.local/bin/dwmbar/dwmb-news @@ -2,3 +2,7 @@ nb=$(cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print " " $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null) ") echo " $nb" +case $BLOCK_BUTTON in + 1) "$TERMINAL" -e newsboat ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac diff --git a/.local/bin/dwmbar/dwmb-test b/.local/bin/dwmbar/dwmb-test index 485614e..7508072 100755 --- a/.local/bin/dwmbar/dwmb-test +++ b/.local/bin/dwmbar/dwmb-test @@ -1,3 +1,6 @@ #!/bin/sh cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 99 | head -n 1 +case $BLOCK_BUTTON in + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac
\ No newline at end of file diff --git a/.local/bin/dwmbar/dwmb-vpn b/.local/bin/dwmbar/dwmb-vpn index 3004c9d..e08e6d6 100755 --- a/.local/bin/dwmbar/dwmb-vpn +++ b/.local/bin/dwmbar/dwmb-vpn @@ -6,9 +6,9 @@ vpnstatus=$(expressvpn status | head -n 1) case "$vpnstatus" in *"Not"*) icon="" ;; - *"Connected"*) icon="" + *"Connected"*) icon="" ;; - *"Connecting"*) icon=" " + *"Connecting"*) icon=" " ;; *) icon="" esac @@ -23,3 +23,7 @@ echo " $icon " # \033]01;34\] # blue # \033]01;33\] # bold yellow # s/onnected\sto\s//; +case $BLOCK_BUTTON in + 1) ~/.local/bin/vpnmenu ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac |