From b3fdb09a1c512738fbe42aefb80a92b4560a5677 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 9 Jan 2022 20:07:10 +0100 Subject: Update icons for statusbar scripts --- .local/bin/statusbar/sb-cpu | 12 ------------ .local/bin/statusbar/sb-cpubars | 4 ++-- .local/bin/statusbar/sb-gpubar | 20 ++++++++++---------- .local/bin/statusbar/sb-internet | 24 ++++++++++++------------ .local/bin/statusbar/sb-mailbox | 8 ++++---- .local/bin/statusbar/sb-memory | 6 +++--- .local/bin/statusbar/sb-nettraf | 6 +++--- .local/bin/statusbar/sb-pacpackages | 4 ++-- .local/bin/statusbar/sb-volume | 12 ++++++------ 9 files changed, 42 insertions(+), 54 deletions(-) delete mode 100755 .local/bin/statusbar/sb-cpu (limited to '.local/bin/statusbar') diff --git a/.local/bin/statusbar/sb-cpu b/.local/bin/statusbar/sb-cpu deleted file mode 100755 index 1572b52..0000000 --- a/.local/bin/statusbar/sb-cpu +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -case $BLOCK_BUTTON in - 1) notify-send "๐Ÿ–ฅ CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;; - 2) setsid -f "$TERMINAL" -e htop ;; - 3) notify-send "๐Ÿ–ฅ CPU module " "\- Shows CPU temperature. -- Click to show intensive processes. -- Middle click to open htop." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -sensors | awk '/Core 0/ {print "๐ŸŒก" $3}' diff --git a/.local/bin/statusbar/sb-cpubars b/.local/bin/statusbar/sb-cpubars index 1684ead..a40dd05 100755 --- a/.local/bin/statusbar/sb-cpubars +++ b/.local/bin/statusbar/sb-cpubars @@ -10,7 +10,7 @@ cache=/tmp/cpubarscache case $BLOCK_BUTTON in 2) setsid -f "$TERMINAL" -e htop ;; - 3) notify-send "๏‹› CPU load module" "Each bar represents + 3) notify-send "๓ฐป  CPU load module" "Each bar represents one CPU core";; 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac @@ -19,7 +19,7 @@ esac stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat) [ ! -f $cache ] && echo "$stats" > "$cache" old=$(cat "$cache") -printf "CPU: " +printf "" echo "$stats" | while read -r row; do id=${row%% *} rest=${row#* } diff --git a/.local/bin/statusbar/sb-gpubar b/.local/bin/statusbar/sb-gpubar index d19995d..2fe6658 100755 --- a/.local/bin/statusbar/sb-gpubar +++ b/.local/bin/statusbar/sb-gpubar @@ -4,23 +4,23 @@ case $BLOCK_BUTTON in 2) setsid -f "$TERMINAL" -e gpuwatch ;; - 3) notify-send "๏‹› GPU load module" "The bar represents + 3) notify-send "๓ฐขฎ GPU load module" "The bar represents GPU load";; 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac # id total idle load=$(nvidia-smi --query-gpu=utilization.memory --format=csv | awk 'FNR == 2 {print $1}') -printf "GPU: " +printf "" case "$load" in - [0-9]) printf "โ–";; - 1[0-9]) printf "โ–‚";; - 2[0-9]) printf "โ–ƒ";; - 3[0-9]) printf "โ–„";; - 4[0-9]) printf "โ–…";; - 5[0-9]) printf "โ–†";; - 6[0-9]) printf "โ–‡";; - 7[0-9]) printf "โ–ˆ";; + [0-9]|1[0-9]) printf "โ–";; + 2[0-9]) printf "โ–‚";; + 3[0-9]) printf "โ–ƒ";; + 4[0-9]) printf "โ–„";; + 5[0-9]) printf "โ–…";; + 6[0-9]) printf "โ–†";; + 7[0-9]) printf "โ–‡";; + 8[0-9]) printf "โ–ˆ";; *) printf "โ–ˆ";; esac printf "\\n" diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index ee1a160..77f7ac0 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -1,24 +1,24 @@ #!/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 -๐Ÿ“ก: no wifi connection -๐Ÿ“ถ: wifi connection with quality -โŽ: no ethernet -๐ŸŒ: ethernet working -๐Ÿ”’: vpn is active + 3) notify-send "๓ฐ–Ÿ Internet module" "\- Click to connect +๓ฐคซ: no wifi connection +๓ฐคจ: wifi connection with quality +๓ฑ‡Ž: no ethernet +๓ฐ–Ÿ: ethernet working +๓ฑŽš: 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)" diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox index a0fa21b..16006de 100755 --- a/.local/bin/statusbar/sb-mailbox +++ b/.local/bin/statusbar/sb-mailbox @@ -6,8 +6,8 @@ case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e neomutt ;; 2) setsid -f mw -Y >/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" diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory index d64f241..d44a416 100755 --- a/.local/bin/statusbar/sb-memory +++ b/.local/bin/statusbar/sb-memory @@ -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 ("RAM: %2.2fGiB\n", ( $3 / 1024))}' +free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB\n", ( $3 / 1024))}' diff --git a/.local/bin/statusbar/sb-nettraf b/.local/bin/statusbar/sb-nettraf index 132d8bf..9cf88b3 100755 --- a/.local/bin/statusbar/sb-nettraf +++ b/.local/bin/statusbar/sb-nettraf @@ -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 "Net: ๏ƒ— %4sB ๏ƒ˜ %4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx) +printf "๓ฐ…€ %4sB ๓ฐ…ƒ %4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx) diff --git a/.local/bin/statusbar/sb-pacpackages b/.local/bin/statusbar/sb-pacpackages index 37ebed3..7633dac 100755 --- a/.local/bin/statusbar/sb-pacpackages +++ b/.local/bin/statusbar/sb-pacpackages @@ -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" diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume index d396108..a62181e 100755 --- a/.local/bin/statusbar/sb-volume +++ b/.local/bin/statusbar/sb-volume @@ -1,28 +1,28 @@ #!/bin/sh -# Prints the current volume or ๐Ÿ”‡ if muted. +# Prints the current volume or ๓ฐ– if muted. case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e pulsemixer ;; 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" ;; esac -[ $(pamixer --get-mute) = true ] && echo ๐Ÿ”‡ && exit +[ $(pamixer --get-mute) = true ] && echo ๓ฐ– && exit 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%" -- cgit v1.2.3-70-g09d2