[MINOR] changed xmobar to have less redundant info

This commit is contained in:
Afonso Franco 2023-05-19 12:33:24 +01:00
parent 5788922406
commit 3a1715c393
Signed by: afonso
SSH key fingerprint: SHA256:JiuxZNdA5bRWXPMUJChI0AQ75yC+cXY4xM0IaVwEVys
3 changed files with 17 additions and 24 deletions

View file

@ -9,55 +9,55 @@ if [ $batLevel -le 20 ];
then
if [ $charging == "on-line" ];
then
echo "<fn=3>󰂆 </fn>"
echo "<fn=3>󰂆 </fn> <fc=#AAC0F0> $batLevel%</fc>"
else
echo "<fn=4>󰁻 </fn>"
echo "<fn=4>󰁻 </fn> <fc=#AAC0F0> $batLevel%</fc>"
fi
elif [ $batLevel -le 30 ];
then
if [ $charging == "on-line" ];
then
echo "<fn=3>󰂇 </fn>"
echo "<fn=3>󰂇 </fn> <fc=#AAC0F0> $batLevel%</fc>"
else
echo "<fn=4>󰁼 </fn>"
echo "<fn=4>󰁼 </fn> <fc=#AAC0F0> $batLevel%</fc>"
fi
elif [ $batLevel -le 40 ];
then
if [ $charging == "on-line" ];
then
echo "<fn=3>󰂈 </fn>"
echo "<fn=3>󰂈 </fn> <fc=#AAC0F0> $batLevel%</fc>"
else
echo "<fn=3>󰁽 </fn>"
echo "<fn=3>󰁽 </fn> <fc=#AAC0F0> $batLevel%</fc>"
fi
elif [ $batLevel -le 60 ];
then
if [ $charging == "on-line" ];
then
echo "<fn=3>󰂉 </fn>"
echo "<fn=3>󰂉 </fn> <fc=#AAC0F0> $batLevel%</fc>"
else
echo "<fn=4>󰁿 </fn>"
echo "<fn=4>󰁿 </fn> <fc=#AAC0F0> $batLevel%</fc>"
fi
elif [ $batLevel -le 80 ];
then
if [ $charging == "on-line" ];
then
echo "<fn=3>󰂊 </fn>"
echo "<fn=3>󰂊 </fn> <fc=#AAC0F0> $batLevel%</fc>"
else
echo "<fn=4>󰂁 </fn>"
echo "<fn=4>󰂁 </fn> <fc=#AAC0F0> $batLevel%</fc>"
fi
elif [ $batLevel -le 95 ];
then
if [ $charging == "on-line" ];
then
echo "<fn=3>󰂋 </fn>"
echo "<fn=3>󰂋 </fn> <fc=#AAC0F0> $batLevel%</fc>"
else
echo "<fn=4>󰂂 </fn>"
echo "<fn=4>󰂂 </fn> <fc=#AAC0F0> $batLevel%</fc>"
fi
else
if [ $charging == "on-line" ];
then
echo "<fn=3>󰂅 </fn>"
echo "<fn=3>󰂅</fn> <fc=#AAC0F0> $batLevel%</fc>"
else
echo "<fn=4>󰁹 </fn>"
echo "<fn=4>󰁹</fn> <fc=#AAC0F0> $batLevel%</fc>"
fi
fi

View file

@ -1,3 +1,3 @@
#!/bin/sh
freespace=$(btrfs fi usage / | grep -Po 'Free \(estimated\):.*' | awk '{print $3}')
echo "<fn=6></fn>: <fc=#AAC0F0> $freespace</fc>"
echo "<fn=6></fn> <fc=#AAC0F0> $freespace</fc>"

View file

@ -15,7 +15,7 @@ Config {font = "Ubuntu bold 10"
-- an integer for the percentage width, so 100 would be 100%.
-- an integer for the minimum pixel height for xmobar, so 24 would force a height of at least 24 pixels.
-- NOTE: The height should be the same as the trayer (system tray) height.
, position = TopSize L 100 40
, position = TopSize L 100 36
, lowerOnStart = True
, hideOnStart = False
, allDesktops = True
@ -55,17 +55,10 @@ Config {font = "Ubuntu bold 10"
\ \
\%disk%\
\ \
\|\
\ \
\ \
\%network%\
\ \
\%bluetooth%\
\ \
\%volume%\
\ \
\%battery%\
\ \
\ \
\|\
\%trayerpad%"
}