summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/clock30
-rwxr-xr-x.scripts/internet32
2 files changed, 29 insertions, 33 deletions
diff --git a/.scripts/clock b/.scripts/clock
index d6a91fb..fb8924d 100755
--- a/.scripts/clock
+++ b/.scripts/clock
@@ -1,21 +1,21 @@
#!/bin/sh
clock=$(date '+%I')
-
+calicon=
case "$clock" in
- "00") icon=" " ;;
- "01") icon=" " ;;
- "02") icon=" " ;;
- "03") icon=" " ;;
- "04") icon=" " ;;
- "05") icon=" " ;;
- "06") icon=" " ;;
- "07") icon=" " ;;
- "08") icon=" " ;;
- "09") icon=" " ;;
- "10") icon=" " ;;
- "11") icon=" " ;;
- "12") icon=" " ;;
+ "00") icon=" ";;
+ "01") icon=" ";;
+ "02") icon=" ";;
+ "03") icon=" ";;
+ "04") icon=" ";;
+ "05") icon=" ";;
+ "06") icon=" ";;
+ "07") icon=" ";;
+ "08") icon=" ";;
+ "09") icon=" ";;
+ "10") icon=" ";;
+ "11") icon=" ";;
+ "12") icon=" ";;
esac
-date "+%Y %b %d (%a) $icon%I:%M%p"
+printf "%s%s" " " "$(date "+%a %b %d $icon%I:%M%p")"
diff --git a/.scripts/internet b/.scripts/internet
index 94b7da2..5b31ff3 100755
--- a/.scripts/internet
+++ b/.scripts/internet
@@ -1,26 +1,22 @@
#!/bin/sh
-# Show wifi 📶 and percent strength or 📡 if none.
-# Show 🌐 if connected to ethernet or ❎ if none.
-# Show 🔒 if a vpn connection is active
+# Show wifi  and percent strength or 睊 if none.
+# Show  if connected to ethernet or  if none.
+# Show  if a vpn connection is active
-case $BLOCK_BUTTON in
- 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;;
- 3) notify-send "🌐 Internet module" "\- Click to connect
-❌: wifi disabled
-📡: no wifi connection
-📶: wifi connection with quality
-❎: no ethernet
-🌐: ethernet working
-🔒: vpn is active
-" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
-esac
+##轢: wifi disabled
+##睊: no wifi connection
+## : wifi connection with quality
+## : no ethernet
+## : ethernet working
+## : vpn is active
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
- wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
+ #wifiicon="$(awk '/^\s*w/ { print " ", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
+ wifiicon=" "
elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then
- grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="📡 " || wifiicon="❌ "
+ grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="睊 " || wifiicon="轢 "
fi
-printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)"
+#printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/ /;s/up/ /" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/ /" /sys/class/net/tun*/operstate 2>/dev/null)"
+printf "%s%s\n" "$wifiicon" "$(sed "s/.*/ /" /sys/class/net/tun*/operstate 2>/dev/null)"