From d24065a7a54ced65494a3408e9046cb2d1b3e7ed Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Fri, 13 Oct 2023 12:05:40 +0200 Subject: [PATCH] move more to font-awesome --- .local/bin/statusbar/sb-getmail | 2 +- .local/bin/statusbar/sb-mailbox | 16 ---------------- .local/bin/statusbar/sb-news | 2 +- .local/bin/statusbar/sb-volume | 14 +++++++------- 4 files changed, 9 insertions(+), 25 deletions(-) delete mode 100755 .local/bin/statusbar/sb-mailbox diff --git a/.local/bin/statusbar/sb-getmail b/.local/bin/statusbar/sb-getmail index 554dd8e..983d251 100755 --- a/.local/bin/statusbar/sb-getmail +++ b/.local/bin/statusbar/sb-getmail @@ -1,4 +1,4 @@ #!/bin/bash num=$(find ~/.local/share/mail/*/INBOX/new -type f | wc -l) -[ $num != 0 ] && printf "📬%s" "$num" +[ $num != 0 ] && printf "%s" "$num" printf '\n' diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox deleted file mode 100755 index 21c85ab..0000000 --- a/.local/bin/statusbar/sb-mailbox +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# i3blocks mail module. -# Displays number of unread mail and an loading icon if updating. -# When clicked, brings up `neomutt`. - -case $BLOCK_BUTTON in - 1) "$TERMINAL" -e neomutt ;; - 2) setsid mailsync >/dev/null & ;; - 3) pgrep -x dunst >/dev/null && notify-send "📬 Mail module" "\- Shows unread mail -- Shows 🔃 if syncing mail -- Left click opens neomutt -- Middle click syncs mail" ;; -esac - -echo "$(du -a ~/.local/share/mail/*/INBOX/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)" diff --git a/.local/bin/statusbar/sb-news b/.local/bin/statusbar/sb-news index 91373ef..45d992c 100755 --- a/.local/bin/statusbar/sb-news +++ b/.local/bin/statusbar/sb-news @@ -1,6 +1,6 @@ #!/bin/sh num="$(newsboat -x print-unread | cut -f1 -d ' ' )" if ! pgrep newsboat > /dev/null ; then - [ "$num" -gt 0 ] 2>/dev/null && printf "📰%s" "$num" + [ "$num" -gt 0 ] 2>/dev/null && printf "%s" "$num" printf '\n' fi diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume index fa0abcd..5d732a1 100755 --- a/.local/bin/statusbar/sb-volume +++ b/.local/bin/statusbar/sb-volume @@ -1,6 +1,6 @@ #!/bin/sh -# Prints the current volume or 🔇 if muted. +# Prints the current volume or  if muted. case $BLOCK_BUTTON in 1) setsid -w -f "$TERMINAL" -e pulsemixer; pkill -RTMIN+10 "${STATUSBAR:-dwmblocks}" ;; @@ -15,8 +15,8 @@ esac vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -# If muted, print 🔇 and exit. -[ "$vol" != "${vol%\[MUTED\]}" ] && echo 🔇 && exit +# If muted, print  and exit. +[ "$vol" != "${vol%\[MUTED\]}" ] && echo  && exit vol="${vol#Volume: }" @@ -30,10 +30,10 @@ split() { vol="$(printf "%.0f" "$(split "$vol" ".")")" case 1 in - $((vol >= 70)) ) icon="🔊" ;; - $((vol >= 30)) ) icon="🔉" ;; - $((vol >= 1)) ) icon="🔈" ;; - * ) echo 🔇 && exit ;; + $((vol >= 70)) ) icon="" ;; + $((vol >= 30)) ) icon="" ;; + $((vol >= 1)) ) icon="" ;; + * ) echo  && exit ;; esac echo "$icon$vol%"