diff --git a/.config/xmobar/scripts/battery.sh b/.config/xmobar/scripts/battery.sh
new file mode 100755
index 0000000..c49c1d8
--- /dev/null
+++ b/.config/xmobar/scripts/battery.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+
+batLevel=$(acpi --battery | grep -Po '(\d+)\%' | sed 's/%//')
+
+charging=$(acpi --ac-adapter | grep -Po '(off-line|on-line)')
+
+if [ $batLevel -le 20 ];
+then
+ if [ $charging == "on-line" ];
+ then
+ echo " "
+ else
+ echo " "
+ fi
+elif [ $batLevel -le 30 ];
+then
+ if [ $charging == "on-line" ];
+ then
+ echo " "
+ else
+ echo " "
+ fi
+elif [ $batLevel -le 40 ];
+then
+ if [ $charging == "on-line" ];
+ then
+ echo " "
+ else
+ echo " "
+ fi
+elif [ $batLevel -le 60 ];
+then
+ if [ $charging == "on-line" ];
+ then
+ echo " "
+ else
+ echo " "
+ fi
+elif [ $batLevel -le 80 ];
+then
+ if [ $charging == "on-line" ];
+ then
+ echo " "
+ else
+ echo " "
+ fi
+elif [ $batLevel -le 95 ];
+then
+ if [ $charging == "on-line" ];
+ then
+ echo " "
+ else
+ echo " "
+ fi
+elif [ $batLevel -g 95 ];
+then
+ if [ $charging == "on-line" ];
+ then
+ echo " "
+ else
+ echo " "
+ fi
+fi
diff --git a/.config/xmobar/scripts/bluetooth.sh b/.config/xmobar/scripts/bluetooth.sh
index 4b4304d..bb88ddc 100755
--- a/.config/xmobar/scripts/bluetooth.sh
+++ b/.config/xmobar/scripts/bluetooth.sh
@@ -15,4 +15,4 @@ do
fi
done
-echo "$ICON"
+echo "$ICON"
diff --git a/.config/xmobar/scripts/network.sh b/.config/xmobar/scripts/network.sh
index de1e837..d423eaa 100755
--- a/.config/xmobar/scripts/network.sh
+++ b/.config/xmobar/scripts/network.sh
@@ -5,7 +5,7 @@ STATES=($(nmcli device show | grep "GENERAL.STATE" | awk '{print $3}'))
for ((i = 0; i < "${#TYPES[@]}"; i++)); do
if [[ ${STATES[$i]} = "(connected)" ]]; then
if [[ ${TYPES[$i]} == *"wifi"* ]]; then
- echo "直"
+ echo "直"
else
echo "ﯱ"
fi
diff --git a/.config/xmobar/scripts/volume.sh b/.config/xmobar/scripts/volume.sh
index 6814b3e..81c985f 100755
--- a/.config/xmobar/scripts/volume.sh
+++ b/.config/xmobar/scripts/volume.sh
@@ -3,9 +3,9 @@ MUTE=$(pactl get-sink-mute @DEFAULT_SINK@ | sed -En 's/Mute: (.)/\1/p')
VOLUME=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]*%' | sed -En 's/(.)\%/\1/p' | head -n1)
if [ "$MUTE" = "yes" ]; then
- echo ""
-elif [ "$VOLUME" -eq 0 ]; then
- echo ""
+ echo "婢"
+elif [ "$VOLUME" -le 20 ]; then
+ echo "奔 $VOLUME"
else
- echo " $VOLUME"
+ echo "墳 $VOLUME"
fi
diff --git a/.config/xmobar/xmobarrc0 b/.config/xmobar/xmobarrc0
index 91d10c8..ca38025 100644
--- a/.config/xmobar/xmobarrc0
+++ b/.config/xmobar/xmobarrc0
@@ -7,10 +7,10 @@
Config {font = "xft:Ubuntu:weight=bold:pixelsize=14:antialias=true:hinting=true"
, additionalFonts =
[ "xft:Font Awesome 6 Free Solid:pixelsize=14"
- , "xft:Font Awesome 6 Free Solid:pixelsize=12:bold"
- , "xft:Font Awesome 6 Free Solid:pixelsize=16"
- , "xft:Hack Nerd Font Mono:pixelsize=21"
- , "xft:Hack Nerd Font Mono:pixelsize=25"
+ , "xft:Font Awesome 6 Free Solid:pixelsize=13:bold"
+ , "xft:FiraCode Nerd Font Mono:pixelsize=21"
+ , "xft:FiraCode Nerd Font Mono:pixelsize=14"
+ , "xft:Font Awesome 6 Free Solid:pixelsize=21"
]
, bgColor = "#2B2E37"
, fgColor = "#929AAD"
@@ -34,6 +34,7 @@ Config {font = "xft:Ubuntu:weight=bold:pixelsize=14:antialias=true:hinting=true"
, Run Com "/home/afonso/.config/xmobar/scripts/volume.sh" [] "volume" 10
, Run Com "/home/afonso/.config/xmobar/scripts/bluetooth.sh" [] "bluetooth" 10
, Run Com "/home/afonso/.config/xmobar/scripts/network.sh" [] "network" 10
+ , Run Com "/home/afonso/.config/xmobar/scripts/battery.sh" [] "battery" 20
, Run Com "/home/afonso/.config/xmobar/scripts/trayer-padding-icon.sh" [] "trayerpad" 20
]
, sepChar = "%"
@@ -57,12 +58,15 @@ Config {font = "xft:Ubuntu:weight=bold:pixelsize=14:antialias=true:hinting=true"
\ \
\|\
\ \
+ \ \
\%network%\
\ \
\%bluetooth%\
\ \
\%volume%\
\ \
+ \%battery%\
+ \ \
\|\
\%trayerpad%"
}