Add click actions for github and wifi
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
170fa1a9b9
commit
cb7fb95e6a
2 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# In case we got a click, open the notifications page
|
||||||
|
[ -n "${BLOCK_BUTTON}" ] && xdg-open "https://github.com/notifications" >/dev/null 2>&1
|
||||||
|
|
||||||
[ -f ${HOME}/.config/i3blocks/.env ] && source ${HOME}/.config/i3blocks/.env
|
[ -f ${HOME}/.config/i3blocks/.env ] && source ${HOME}/.config/i3blocks/.env
|
||||||
|
|
||||||
# Get token from vault
|
# Get token from vault
|
||||||
|
|
|
@ -17,3 +17,6 @@ network=$(iwgetid -r)
|
||||||
[ -z "${network}" ] && exit
|
[ -z "${network}" ] && exit
|
||||||
|
|
||||||
printf "\uf9a1 <span color=\"#8FAAFC\">%s</span> <span color=\"#50fa7b\">(%s)</span>" ${network} ${ip}
|
printf "\uf9a1 <span color=\"#8FAAFC\">%s</span> <span color=\"#50fa7b\">(%s)</span>" ${network} ${ip}
|
||||||
|
|
||||||
|
# On click copy IP
|
||||||
|
[ -n "${BLOCK_BUTTON}" ] && echo -n "${ip}" | tr -d '\n' | xclip -selection c
|
||||||
|
|
Loading…
Reference in a new issue