os/arch (lemonbar): update lemons
This commit is contained in:
parent
f364e7dd53
commit
e3c731f35e
|
@ -7,11 +7,9 @@ if [[ ! -f ~/.private/config/email.conf ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ~/.private/config/email.conf
|
. $HOME/.private/config/email.conf
|
||||||
. $CWD/../panel-config
|
. $CWD/../panel-config
|
||||||
|
|
||||||
ICON_MAIL=""
|
|
||||||
|
|
||||||
get_mail() {
|
get_mail() {
|
||||||
local feed=$(curl -u "$1:$2" --silent https://mail.google.com/mail/feed/atom)
|
local feed=$(curl -u "$1:$2" --silent https://mail.google.com/mail/feed/atom)
|
||||||
if [[ "${feed//\<fullcount\>/}" != "$feed" ]]; then
|
if [[ "${feed//\<fullcount\>/}" != "$feed" ]]; then
|
||||||
|
@ -35,7 +33,7 @@ icon="${ICON_MAIL}"
|
||||||
color="${COLOR_FG}"
|
color="${COLOR_FG}"
|
||||||
case $num in
|
case $num in
|
||||||
[1-9]*)
|
[1-9]*)
|
||||||
icon="$icon$num"
|
icon="$icon $num"
|
||||||
lastnum=$(cat "$mailtmp")
|
lastnum=$(cat "$mailtmp")
|
||||||
if [[ $num != $lastnum ]]; then
|
if [[ $num != $lastnum ]]; then
|
||||||
echo "$num" > "$mailtmp"
|
echo "$num" > "$mailtmp"
|
||||||
|
|
|
@ -15,7 +15,7 @@ if [ "$num" -gt 0 ]; then
|
||||||
aplay -N -q /usr/share/sounds/ding.wav
|
aplay -N -q /usr/share/sounds/ding.wav
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "U%{F${COLOR_2}}$ICON_UPD$num%{F-}"
|
echo "U%{F${COLOR_2}}$ICON_UPD $num%{F-}"
|
||||||
else
|
else
|
||||||
echo "U%{F${COLOR_DIM}}$ICON_UPD%{F-}"
|
echo "U%{F${COLOR_DIM}}$ICON_UPD%{F-}"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env dash
|
#!/usr/bin/env dash
|
||||||
|
|
||||||
# I expect all volume adjustments to be done through the volume.sh script (in
|
# I expect all volume adjustments to be done through vol.sh (in os/arch/bin), which will
|
||||||
# os/arch/bin), which will inform lemonbar of changes, so we only need to intialize
|
# inform lemonbar of changes, so we only need to intialize volume once here.
|
||||||
# volume once here.
|
|
||||||
|
|
||||||
. $(dirname $0)/../panel-config
|
. $(dirname $0)/../panel-config
|
||||||
|
|
||||||
|
@ -11,10 +10,9 @@ vol=0
|
||||||
if echo "$data" | grep '\[on\]' >/dev/null; then
|
if echo "$data" | grep '\[on\]' >/dev/null; then
|
||||||
vol=$(echo "$data" | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)
|
vol=$(echo "$data" | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)
|
||||||
case $vol in
|
case $vol in
|
||||||
0) echo "V${ICON_MUTED}"
|
0) echo "V${ICON_MUTED} " ;;
|
||||||
;;
|
[1-7]|[1-7][0-9]) echo "V${ICON_SPEAKER_LOW} " ;;
|
||||||
*) echo "V${ICON_SPEAKER}"
|
*) echo "V${ICON_SPEAKER}" ;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo "V%{F${COLOR_DIM}}${ICON_MUTED}%{F-}"
|
echo "V%{F${COLOR_DIM}}${ICON_MUTED}%{F-}"
|
||||||
|
|
Loading…
Reference in a new issue