feat: put spaces in statusbar modules
This commit is contained in:
parent
82e236a2d9
commit
397f10b8d2
@ -27,7 +27,8 @@ do
|
||||
status="$(cat "$bat/status")"
|
||||
capacity="$(cat "$bat/capacity")"
|
||||
if [ "$status" = "Full" ]; then
|
||||
printf " FULL" && exit
|
||||
status=" " && capacity="FULL"
|
||||
printf " %s %s " "$status" "$capacity" && exit
|
||||
elif [ "$status" = "Charging" ]; then
|
||||
status=""
|
||||
else
|
||||
@ -39,5 +40,5 @@ do
|
||||
*) status="" ; notify;;
|
||||
esac
|
||||
fi
|
||||
printf "%s %3d%%\n" "$status" "$capacity";
|
||||
printf " %s %3d%% " "$status" "$capacity";
|
||||
done && return 0
|
||||
|
@ -11,8 +11,9 @@
|
||||
|
||||
|
||||
mpc="$(mpc --format "%albumartist% - %title%")"
|
||||
format() { tac | sed "s/^volume: n\/a.*/ 🎵 ---/g;/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/ ⏸/g;s/\\[playing\\].*/ 🎵/g" | paste -sd ' ' -;}
|
||||
format() { tac | sed "s/^volume:n\/a.*//g;/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;s/\\[playing\\].*/🎵/g" | paste -sd ' ' -;}
|
||||
|
||||
pgrep -f sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &
|
||||
|
||||
echo "$mpc" | format
|
||||
mpc=$(echo "$mpc" | format)
|
||||
[ -n "$mpc" ] && printf " %s " "$mpc"
|
||||
|
Reference in New Issue
Block a user