Add click actions for github and wifi

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-01-19 15:00:35 +01:00
parent 170fa1a9b9
commit cb7fb95e6a
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
2 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,9 @@
#!/bin/bash
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
# Get token from vault

View File

@ -17,3 +17,6 @@ network=$(iwgetid -r)
[ -z "${network}" ] && exit
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