More changes to bar look.

This commit is contained in:
Bartek Stalewski 2021-07-26 16:52:58 +02:00
parent dc9d5df7e4
commit e0a52c52b0
4 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
[ ! -e ~/.local/share/passwords ] && echo "no accounts configured" && exit 1
@ -13,4 +13,4 @@ for i in $(cat ~/.local/share/passwords); do
[ $count -ne 0 ] && export unread=$((unread + count))
fi
done
[ "$unread" -eq 0 ] && echo "no new mail" || echo "^c#161616^^b#fd4285^new mail: ${unread}^d^"
[ "$unread" -eq 0 ] && printf "\ue158 no new mail" || printf "^c#161616^^b#fd4285^\ue158 new mail: ${unread}^d^"

View File

@ -1,10 +1,10 @@
#!/bin/sh
#!/bin/bash
# Show wifi 📶 and percent strength or 📡 if none.
# Show 🌐 if connected to ethernet or ❎ if none.
# Show 🔒 if a vpn connection is active
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
down) echo "^c#161616^^b#fd4285^NO WIFI^d^" ;;
up) echo `iw dev wlp3s0 info | awk '/ssid/ {print $2}'` ;;
down) printf "^c#161616^^b#fd4285^\ue63e no wifi^d^" ;;
up) printf "\ue63e $(iw dev wlp3s0 info | awk '/ssid/ {print $2}')" ;;
esac

View File

@ -2,7 +2,7 @@
vol="$(pamixer --get-volume)"
[ $(echo $vol | wc -c) -lt 4 ] && svol=" ${vol}%%" || svol="${vol}%%"
[ $(pamixer --get-mute) = true ] && volinfo="\ue04f ^c#161616^^b#fd4285^mute^d^" || volinfo="\ue050 ${svol}"
[ $(pamixer --get-mute) = true ] && volinfo="^c#161616^^b#fd4285^\ue04f mute^d^" || volinfo="\ue050 ${svol}"
device=$(pamixer --list-sources | awk '/Raven/ {print $1}')
[ $(pamixer --source $device --get-mute) = true ] && micinfo="\ue02b ^c#161616^^b#fd4285^MM^d^" || micinfo="\ue02a on"
[ $(pamixer --source $device --get-mute) = true ] && micinfo="^c#161616^^b#fd4285^\ue02b MM^d^" || micinfo="\ue02a on"
printf "${volinfo} (${micinfo})"

View File

@ -1,11 +1,11 @@
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
{" \ue158 ", "sb-mail", 180, 16 },
{"", "sb-volume", 0, 12 },
{"\ue63e ", "sb-network", 1, 0 },
{"", "sb-battery", 3, 0 },
{"\ue8b5 ", "date '+%F %T '", 1, 0 },
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
{"", "sb-mail", 180, 16 },
{"", "sb-volume", 0, 12 },
{"", "sb-network", 1, 0 },
{"", "sb-battery", 3, 0 },
{"\ue8b5 ", "date '+%F %I:%M:%S %p'", 1, 0 },
};
//sets delimeter between status commands. NULL character ('\0') means no delimeter.