+ Reducing script word count

This commit is contained in:
ziro 2020-05-18 13:02:43 +07:00
parent 1bed6fc964
commit 1d2c406697
2 changed files with 4 additions and 3 deletions

View file

@ -401,11 +401,11 @@ exec = ~/.config/polybar/scripts/player-mpris-tail.py -f '{:artist:t10:{artist}:
tail = true
label-font = 3
label-foreground = ${colors.foreground}
format-prefix = " "
format-prefix = "  "
format-prefix-font = "5"
format-foreground = ${colors.spotgreen}
format-background = ${colors.background}
format-padding = 2
format-padding = 1
click-left = ~/.config/polybar/scripts/player-mpris-tail.py play-pause &
scroll-up = ~/.config/polybar/scripts/player-mpris-tail.py next &
scroll-down = ~/.config/polybar/scripts/player-mpris-tail.py previous &

View file

@ -2,7 +2,8 @@
capacity=$(df -h --output=source,avail /home | grep -A1 '/' | sed "s/^.* //;s/[[:alpha:]]//")
warn=""
if [ $capacity -lt 71 ]; then warn='!'; fi
[ $capacity -lt 21 ] && warn='!'
printf "%s%s" "$warn " "$(echo $capacity | sed "s/$/G free/")"