os/arch (panel): update style, remove music lemon

This commit is contained in:
Henrik Lissner 2017-03-16 15:10:58 -04:00
parent 8304d2879e
commit 519cdf6a09
3 changed files with 7 additions and 53 deletions

View file

@ -1,47 +0,0 @@
#!/usr/bin/env dash
. $(dirname $0)/../panel-config
progress_bar() {
BAR_SIZE=${2:-26}
C1="%{F${COLOR_6}}-%{F-}"
C2="%{F${COLOR_DIM}}-%{F-}"
DELIM=
echo "$1" | SIZE=$BAR_SIZE CHAR1="$C1" CHAR2="$C2" SEP='' START="$DELIM" END="$DELIM" mkb
}
while :; do
if ! pgrep mpd >/dev/null; then
sleep 5
continue
fi
output=$(mpc --format ";%title%;%artist%;%album%")
if echo $output | grep "^;" 2>&1 >/dev/null; then
# title=$(echo "$output" | head -1 | cut -d';' -f2)
# artist=$(echo "$output" | head -1 | cut -d';' -f3)
# album=$(echo "$output" | head -1 | cut -d';' -f4)
seek=$(echo "$output" | awk 'NR==2 {print $3}')
perc=$(echo "$output" | awk 'NR==2 {print $4}' | tr -d '()')
state=$(echo "$output" | awk 'NR==2 {print $1}')
case "$state" in
"[playing]") icon="%{F${COLOR_2}}${ICON_PLAY}%{F-}" ;;
"[paused]") icon="%{F${COLOR_4}}${ICON_PAUSE}%{F-}" ;;
*) icon="" ;;
esac
if [ -n "$icon" ]
then
# song="$title - $artist"
# [ -n "$album" ] && song="$song ($album)"
echo "S%{B${COLOR_ALTBG}} $icon ${seek%/*} $(progress_bar $perc 16) ${seek#*/} %{B-} "
fi
else
echo "S"
fi
sleep 1
done
# vim:set ft=sh:

View file

@ -100,14 +100,15 @@ parse() {
;;
esac
echo -e \
"%{l} ${xtitle}${song}" \
"%{c}${wm}" \
"%{l}${wm}" \
"%{c}" \
"%{r}${battery}${mail}${updates}${vol}${wifi} ${datetime}"
done
}
parse < "${PANEL_FIFO}" | \
lemonbar \
-d \
-a 32 \
-g 2560x$PANEL_HEIGHT+1200+0 \
-f "$PANEL_FONT" \

View file

@ -1,11 +1,11 @@
PANEL_FIFO=/tmp/panel-fifo
# Customization ########################
PANEL_HEIGHT=32
PANEL_HEIGHT=30
# PANEL_FONT="terminus:size=8:antialias=false"
PANEL_FONT="FiraSans:size=10:style=Bold"
PANEL_FONT="FiraSans:size=9:style=Bold"
# ICON_FONT="siji:size=8:antialias=false"
ICON_FONT="FontAwesome:size=12"
ICON_FONT="FontAwesome:size=11"
## Colors
# black
@ -37,7 +37,7 @@ bg="#22252c"
fg="#e5e8e6"
COLOR_FG="$fg"
COLOR_BG="#7701040b"
COLOR_BG="#4401040b"
# COLOR_BG="#DD${COLOR_0#?}"
# COLOR_DIM="#155872"