new internet, date and help modules
This commit is contained in:
12
.scripts/statusbar/i3date
Executable file
12
.scripts/statusbar/i3date
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
date '+%Y %b %d (%a) %I:%M%p'
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) pgrep -x dunst >/dev/null && notify-send "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" ;;
|
||||
2) "$TERMINAL" -e calcurse ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "<b>📅 Time/date module:</b>
|
||||
- Left click to show month via \`cal\`
|
||||
- Middle click opens calcurse if installed" ;;
|
||||
esac
|
||||
|
||||
5
.scripts/statusbar/i3help
Executable file
5
.scripts/statusbar/i3help
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$BLOCK_BUTTON" = "1" ] && "$READER" ~/.config/i3/i3_guide.pdf
|
||||
|
||||
echo "❓"
|
||||
18
.scripts/statusbar/i3internet
Executable file
18
.scripts/statusbar/i3internet
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) $TERMINAL -e nmtui ;;
|
||||
3) pgrep -x dunst >/dev/null && notify-send "<b>Internet module:</b>
|
||||
- Left click for \`nmtui\` for wifi access
|
||||
📡: no wifi connection
|
||||
📶: wifi connection with quality
|
||||
❎: no ethernet
|
||||
🌐: ethernet working
|
||||
" ;;
|
||||
esac
|
||||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
|
||||
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep ^w /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
|
||||
|
||||
printf "%s %s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) $TERMINAL -e nmtui ;;
|
||||
esac
|
||||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && echo 📡 && exit
|
||||
|
||||
grep ^w /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }'
|
||||
Reference in New Issue
Block a user