Use fontawesome instead of emojis
This commit is contained in:
0
.local/bin/statusbar/sb-battery
Normal file → Executable file
0
.local/bin/statusbar/sb-battery
Normal file → Executable file
20
.local/bin/statusbar/sb-clock
Normal file → Executable file
20
.local/bin/statusbar/sb-clock
Normal file → Executable file
@@ -1,23 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
clock=$(date '+%I')
|
||||
|
||||
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="🕛" ;;
|
||||
esac
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;;
|
||||
2) setsid -f "$TERMINAL" -e calcurse ;;
|
||||
@@ -26,4 +8,4 @@ case $BLOCK_BUTTON in
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
date "+%Y %b %d (%a) $icon%I:%M%p"
|
||||
date "+%b %d %I:%M%p"
|
||||
|
||||
2
.local/bin/statusbar/sb-cpu
Normal file → Executable file
2
.local/bin/statusbar/sb-cpu
Normal file → Executable file
@@ -9,4 +9,4 @@ case $BLOCK_BUTTON in
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
sensors | awk '/Core 0/ {print "🌡" $3}'
|
||||
sensors | awk '/Core 0/ {print "" $3}'
|
||||
|
||||
0
.local/bin/statusbar/sb-cpubars
Normal file → Executable file
0
.local/bin/statusbar/sb-cpubars
Normal file → Executable file
0
.local/bin/statusbar/sb-disk
Normal file → Executable file
0
.local/bin/statusbar/sb-disk
Normal file → Executable file
10
.local/bin/statusbar/sb-forecast
Normal file → Executable file
10
.local/bin/statusbar/sb-forecast
Normal file → Executable file
@@ -13,17 +13,17 @@ getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;}
|
||||
# precipitation chance and the daily high and low from the downloaded file and
|
||||
# display them with coresponding emojis.
|
||||
showweather() { printf "%s" "$(sed '16q;d' "$weatherreport" |
|
||||
grep -wo "[0-9]*%" | sort -rn | sed "s/^/☔/g;1q" | tr -d '\n')"
|
||||
sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " 🥶" $1 "°","🌞" $2 "°"}' ;}
|
||||
grep -wo "[0-9]*%" | sort -rn | sed "s/^//g;1q" | tr -d '\n')"
|
||||
sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " " $1 "°","" $2 "°"}' ;}
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e less -Srf "$weatherreport" ;;
|
||||
2) getforecast && showweather ;;
|
||||
3) notify-send "🌈 Weather module" "\- Left click for full forecast.
|
||||
- Middle click to update forecast.
|
||||
☔: Chance of rain/snow
|
||||
🥶: Daily low
|
||||
🌞: Daily high" ;;
|
||||
: Chance of rain/snow
|
||||
: Daily low
|
||||
: Daily high" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
|
||||
14
.local/bin/statusbar/sb-internet
Normal file → Executable file
14
.local/bin/statusbar/sb-internet
Normal file → Executable file
@@ -7,18 +7,18 @@
|
||||
case $BLOCK_BUTTON in
|
||||
1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;;
|
||||
3) notify-send "🌐 Internet module" "\- Click to connect
|
||||
📡: no wifi connection
|
||||
📶: wifi connection with quality
|
||||
❎: no ethernet
|
||||
: no wifi connection
|
||||
: wifi connection with quality
|
||||
: no ethernet
|
||||
🌐: ethernet working
|
||||
🔒: vpn is active
|
||||
: vpn is active
|
||||
" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
||||
down) wifiicon="📡 " ;;
|
||||
up) wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;;
|
||||
down) wifiicon=" " ;;
|
||||
up) wifiicon="$(awk '/^\s*w/ { print "", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;;
|
||||
esac
|
||||
|
||||
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)"
|
||||
|
||||
0
.local/bin/statusbar/sb-iplocate
Normal file → Executable file
0
.local/bin/statusbar/sb-iplocate
Normal file → Executable file
0
.local/bin/statusbar/sb-kbselect
Normal file → Executable file
0
.local/bin/statusbar/sb-kbselect
Normal file → Executable file
8
.local/bin/statusbar/sb-mailbox
Normal file → Executable file
8
.local/bin/statusbar/sb-mailbox
Normal file → Executable file
@@ -6,8 +6,8 @@
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e neomutt ;;
|
||||
2) setsid -f mw sync >/dev/null ;;
|
||||
3) notify-send "📬 Mail module" "\- Shows unread mail
|
||||
- Shows 🔃 if syncing mail
|
||||
3) notify-send " Mail module" "\- Shows unread mail
|
||||
- Shows if syncing mail
|
||||
- Left click opens neomutt
|
||||
- Middle click syncs mail" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
@@ -15,6 +15,6 @@ esac
|
||||
|
||||
unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
|
||||
|
||||
pidof mbsync >/dev/null 2>&1 && icon="🔃"
|
||||
pidof mbsync >/dev/null 2>&1 && icon=""
|
||||
|
||||
[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "📬$unread$icon"
|
||||
[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "$unread$icon"
|
||||
|
||||
6
.local/bin/statusbar/sb-memory
Normal file → Executable file
6
.local/bin/statusbar/sb-memory
Normal file → Executable file
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
||||
1) notify-send " Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
||||
2) setsid -f "$TERMINAL" -e htop ;;
|
||||
3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total.
|
||||
3) notify-send " Memory module" "\- Shows Memory Used/Total.
|
||||
- Click to show memory hogs.
|
||||
- Middle click to open htop." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf ("🧠%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
|
||||
|
||||
0
.local/bin/statusbar/sb-moonphase
Normal file → Executable file
0
.local/bin/statusbar/sb-moonphase
Normal file → Executable file
0
.local/bin/statusbar/sb-mpdup
Normal file → Executable file
0
.local/bin/statusbar/sb-mpdup
Normal file → Executable file
4
.local/bin/statusbar/sb-music
Normal file → Executable file
4
.local/bin/statusbar/sb-music
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | paste -sd ' ' -;}
|
||||
filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*//g;/\\[playing\\].*/d" | paste -sd ' ' -;}
|
||||
|
||||
pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &
|
||||
|
||||
@@ -8,7 +8,7 @@ case $BLOCK_BUTTON in
|
||||
1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause
|
||||
2) mpc toggle | filter ;; # right click, pause/unpause
|
||||
3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing.
|
||||
- ⏸ when paused.
|
||||
- when paused.
|
||||
- Left click opens ncmpcpp.
|
||||
- Middle click pauses.
|
||||
- Scroll changes track.";; # right click, pause/unpause
|
||||
|
||||
6
.local/bin/statusbar/sb-nettraf
Normal file → Executable file
6
.local/bin/statusbar/sb-nettraf
Normal file → Executable file
@@ -6,8 +6,8 @@
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e bmon ;;
|
||||
3) notify-send "🌐 Network traffic module" "🔻: Traffic received
|
||||
🔺: Traffic transmitted" ;;
|
||||
3) notify-send "🌐 Network traffic module" ": Traffic received
|
||||
: Traffic transmitted" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
@@ -26,4 +26,4 @@ update() {
|
||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
||||
|
||||
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
printf "%4sB %4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
||||
|
||||
6
.local/bin/statusbar/sb-news
Normal file → Executable file
6
.local/bin/statusbar/sb-news
Normal file → Executable file
@@ -5,13 +5,13 @@
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid "$TERMINAL" -e newsboat ;;
|
||||
2) setsid -f newsup >/dev/null exit ;;
|
||||
2) setsid -f newsup >/dev/null exit ;;
|
||||
3) notify-send "📰 News module" "\- Shows unread news items
|
||||
- Shows 🔃 if updating with \`newsup\`
|
||||
- Shows if updating with \`newsup\`
|
||||
- Left click opens newsboat
|
||||
- Middle click syncs RSS feeds
|
||||
<b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "📰" $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)"
|
||||
cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "" $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)"
|
||||
|
||||
4
.local/bin/statusbar/sb-pacpackages
Normal file → Executable file
4
.local/bin/statusbar/sb-pacpackages
Normal file → Executable file
@@ -20,10 +20,10 @@
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f "$TERMINAL" -e sb-popupgrade ;;
|
||||
2) notify-send "$(/usr/bin/pacman -Qu)" ;;
|
||||
3) notify-send "🎁 Upgrade module" "📦: number of upgradable packages
|
||||
3) notify-send "🎁 Upgrade module" ": number of upgradable packages
|
||||
- Left click to upgrade packages
|
||||
- Middle click to show upgradable packages" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/📦/;s/^📦0$//g"
|
||||
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^//;s/^0$//g"
|
||||
|
||||
0
.local/bin/statusbar/sb-popupgrade
Normal file → Executable file
0
.local/bin/statusbar/sb-popupgrade
Normal file → Executable file
2
.local/bin/statusbar/sb-tasks
Normal file → Executable file
2
.local/bin/statusbar/sb-tasks
Normal file → Executable file
@@ -17,4 +17,4 @@ case $BLOCK_BUTTON in
|
||||
esac
|
||||
|
||||
[ "$num" != "0(0)" ] &&
|
||||
echo "🤖$num"
|
||||
echo "$num"
|
||||
|
||||
8
.local/bin/statusbar/sb-volume
Normal file → Executable file
8
.local/bin/statusbar/sb-volume
Normal file → Executable file
@@ -7,7 +7,7 @@ case $BLOCK_BUTTON in
|
||||
2) pamixer -t ;;
|
||||
4) pamixer --allow-boost -i 1 ;;
|
||||
5) pamixer --allow-boost -d 1 ;;
|
||||
3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
|
||||
3) notify-send "📢 Volume module" "\- Shows volume , if muted.
|
||||
- Middle click to mute.
|
||||
- Scroll to change." ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
@@ -18,11 +18,11 @@ esac
|
||||
vol="$(pamixer --get-volume)"
|
||||
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon="🔊"
|
||||
icon=""
|
||||
elif [ "$vol" -lt "30" ]; then
|
||||
icon="🔈"
|
||||
icon=""
|
||||
else
|
||||
icon="🔉"
|
||||
icon=""
|
||||
fi
|
||||
|
||||
echo "$icon$vol%"
|
||||
|
||||
Reference in New Issue
Block a user