feat: put spaces in statusbar modules
This commit is contained in:
parent
82e236a2d9
commit
397f10b8d2
@ -27,7 +27,8 @@ do
|
|||||||
status="$(cat "$bat/status")"
|
status="$(cat "$bat/status")"
|
||||||
capacity="$(cat "$bat/capacity")"
|
capacity="$(cat "$bat/capacity")"
|
||||||
if [ "$status" = "Full" ]; then
|
if [ "$status" = "Full" ]; then
|
||||||
printf " FULL" && exit
|
status=" " && capacity="FULL"
|
||||||
|
printf " %s %s " "$status" "$capacity" && exit
|
||||||
elif [ "$status" = "Charging" ]; then
|
elif [ "$status" = "Charging" ]; then
|
||||||
status=""
|
status=""
|
||||||
else
|
else
|
||||||
@ -39,5 +40,5 @@ do
|
|||||||
*) status="" ; notify;;
|
*) status="" ; notify;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
printf "%s %3d%%\n" "$status" "$capacity";
|
printf " %s %3d%% " "$status" "$capacity";
|
||||||
done && return 0
|
done && return 0
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
|
|
||||||
|
|
||||||
mpc="$(mpc --format "%albumartist% - %title%")"
|
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 &
|
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