diff options
Diffstat (limited to 'i3/.config/i3blocks/bin')
-rwxr-xr-x | i3/.config/i3blocks/bin/email | 10 | ||||
-rwxr-xr-x | i3/.config/i3blocks/bin/wifi | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/i3/.config/i3blocks/bin/email b/i3/.config/i3blocks/bin/email new file mode 100755 index 0000000..ab875e0 --- /dev/null +++ b/i3/.config/i3blocks/bin/email @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +nMails=$(find $HOME/.mail -path '*/new/*' -type f -not -path '*/rss/*' -not -path '*/lists/*' | wc -l) +echo -e "${nMails}\n${nMails}" + +if [[ ${nMails} -eq 0 ]]; then + echo \#FFFFFF +else + echo \#00FF00 +fi diff --git a/i3/.config/i3blocks/bin/wifi b/i3/.config/i3blocks/bin/wifi new file mode 100755 index 0000000..2e47da2 --- /dev/null +++ b/i3/.config/i3blocks/bin/wifi @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +quality=$(lspci | grep -i Wireless | sed 's/^.*(rev \(.*\))/\1/') +ssid=$(iwconfig wlp2s0 | grep -oP '(?<=ESSID:").*(?=")') +address=$(ip addr show wlp2s0 | grep -oP -m1 "(?<=inet ).*(?=/)") + +echo "(${quality}% at ${ssid}) ${address}" |