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
|
||||
|
@ -12,9 +12,9 @@
|
||||
|
||||
# Wifi quality percentage and icon if ethernet is connected.
|
||||
wifi="$(grep "^\s*w" /proc/net/wireless | awk '{ printf int($3 * 100 / 70) }')"
|
||||
[ $wifi -ne 0 ] && printf "直 %3d%%" $wifi || printf "睊 ---"
|
||||
[ $wifi -ne 0 ] && printf " 直 %3d%% " $wifi || printf " 睊 --- "
|
||||
eth="$(cat /sys/class/net/enp0s25/operstate)"
|
||||
if [ "up" = "$eth" ]; then
|
||||
printf " / "
|
||||
printf " / "
|
||||
fi
|
||||
|
||||
|
@ -22,4 +22,4 @@ do
|
||||
done
|
||||
[ -n "$unread" ] && unread="($(echo "$unread" | cut -c 2-))" || exit
|
||||
|
||||
printf " %s%s" "$unread" "$icon"
|
||||
printf " %s%s " "$unread" "$icon"
|
||||
|
@ -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"
|
||||
|
@ -9,7 +9,7 @@
|
||||
# @description : volume block for dwmblocks
|
||||
######################################################################
|
||||
|
||||
[ "1" = $(pulsemixer --get-mute) ] && echo "婢 ---" && exit
|
||||
[ "1" = $(pulsemixer --get-mute) ] && echo " 婢 --- " && exit
|
||||
|
||||
vol="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')"
|
||||
|
||||
@ -21,5 +21,5 @@ else
|
||||
icon="奔"
|
||||
fi
|
||||
|
||||
printf "%s %3d%%" $icon $vol
|
||||
printf " %s %3d%% " $icon $vol
|
||||
|
||||
|
Reference in New Issue
Block a user