os/arch (panel): update style, remove music lemon
This commit is contained in:
		
							parent
							
								
									8304d2879e
								
							
						
					
					
						commit
						519cdf6a09
					
				| 
						 | 
					@ -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:
 | 
					 | 
				
			||||||
| 
						 | 
					@ -100,14 +100,15 @@ parse() {
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
        esac
 | 
					        esac
 | 
				
			||||||
        echo -e \
 | 
					        echo -e \
 | 
				
			||||||
            "%{l}    ${xtitle}${song}" \
 | 
					            "%{l}${wm}" \
 | 
				
			||||||
            "%{c}${wm}" \
 | 
					            "%{c}" \
 | 
				
			||||||
            "%{r}${battery}${mail}${updates}${vol}${wifi}  ${datetime}"
 | 
					            "%{r}${battery}${mail}${updates}${vol}${wifi}  ${datetime}"
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
parse < "${PANEL_FIFO}" | \
 | 
					parse < "${PANEL_FIFO}" | \
 | 
				
			||||||
    lemonbar \
 | 
					    lemonbar \
 | 
				
			||||||
 | 
					    -d \
 | 
				
			||||||
    -a 32 \
 | 
					    -a 32 \
 | 
				
			||||||
    -g 2560x$PANEL_HEIGHT+1200+0 \
 | 
					    -g 2560x$PANEL_HEIGHT+1200+0 \
 | 
				
			||||||
    -f "$PANEL_FONT" \
 | 
					    -f "$PANEL_FONT" \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
PANEL_FIFO=/tmp/panel-fifo
 | 
					PANEL_FIFO=/tmp/panel-fifo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Customization ########################
 | 
					# Customization ########################
 | 
				
			||||||
PANEL_HEIGHT=32
 | 
					PANEL_HEIGHT=30
 | 
				
			||||||
# PANEL_FONT="terminus:size=8:antialias=false"
 | 
					# 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="siji:size=8:antialias=false"
 | 
				
			||||||
ICON_FONT="FontAwesome:size=12"
 | 
					ICON_FONT="FontAwesome:size=11"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Colors
 | 
					## Colors
 | 
				
			||||||
# black
 | 
					# black
 | 
				
			||||||
| 
						 | 
					@ -37,7 +37,7 @@ bg="#22252c"
 | 
				
			||||||
fg="#e5e8e6"
 | 
					fg="#e5e8e6"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COLOR_FG="$fg"
 | 
					COLOR_FG="$fg"
 | 
				
			||||||
COLOR_BG="#7701040b"
 | 
					COLOR_BG="#4401040b"
 | 
				
			||||||
# COLOR_BG="#DD${COLOR_0#?}"
 | 
					# COLOR_BG="#DD${COLOR_0#?}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# COLOR_DIM="#155872"
 | 
					# COLOR_DIM="#155872"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue