Merge pull request '[FIX] fixed nerdfont xmobar deprecated icons' (#1) from backup-master into master
Reviewed-on: #1
This commit is contained in:
commit
5788922406
4 changed files with 22 additions and 23 deletions
|
@ -9,56 +9,55 @@ if [ $batLevel -le 20 ];
|
|||
then
|
||||
if [ $charging == "on-line" ];
|
||||
then
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
else
|
||||
echo "<fn=4> </fn>"
|
||||
echo "<fn=4> </fn>"
|
||||
fi
|
||||
elif [ $batLevel -le 30 ];
|
||||
then
|
||||
if [ $charging == "on-line" ];
|
||||
then
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
else
|
||||
echo "<fn=4> </fn>"
|
||||
echo "<fn=4> </fn>"
|
||||
fi
|
||||
elif [ $batLevel -le 40 ];
|
||||
then
|
||||
if [ $charging == "on-line" ];
|
||||
then
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
else
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
fi
|
||||
elif [ $batLevel -le 60 ];
|
||||
then
|
||||
if [ $charging == "on-line" ];
|
||||
then
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
else
|
||||
echo "<fn=4> </fn>"
|
||||
echo "<fn=4> </fn>"
|
||||
fi
|
||||
elif [ $batLevel -le 80 ];
|
||||
then
|
||||
if [ $charging == "on-line" ];
|
||||
then
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
else
|
||||
echo "<fn=4> </fn>"
|
||||
echo "<fn=4> </fn>"
|
||||
fi
|
||||
elif [ $batLevel -le 95 ];
|
||||
then
|
||||
if [ $charging == "on-line" ];
|
||||
then
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
else
|
||||
echo "<fn=4> </fn>"
|
||||
echo "<fn=4> </fn>"
|
||||
fi
|
||||
elif [ $batLevel -g 95 ];
|
||||
then
|
||||
else
|
||||
if [ $charging == "on-line" ];
|
||||
then
|
||||
echo "<fn=3> </fn>"
|
||||
echo "<fn=3> </fn>"
|
||||
else
|
||||
echo "<fn=4> </fn>"
|
||||
echo "<fn=4> </fn>"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
regex="([0-9A-Z]*:)+"
|
||||
DEVICES=$(bluetoothctl devices)
|
||||
ICON=""
|
||||
ICON=""
|
||||
COLOR="#696B71"
|
||||
for DEVICE in $DEVICES
|
||||
do
|
||||
if [[ $DEVICE =~ $regex ]]; then
|
||||
STATUS=$(bluetoothctl info $DEVICE | grep "Connected" | awk '{print $2}')
|
||||
if [ $STATUS = "yes" ]; then
|
||||
ICON=""
|
||||
ICON=""
|
||||
COLOR="#DFDFDF"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -5,9 +5,9 @@ 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 "<fc=#DFDFDF><fn=3>直</fn></fc>"
|
||||
echo "<fc=#DFDFDF><fn=3></fn></fc>"
|
||||
else
|
||||
echo "<fc=#DFDFDF><fn=3>ﯱ</fn></fc>"
|
||||
echo "<fc=#DFDFDF><fn=3></fn></fc>"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -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 "<fc=#696B71><fn=3>婢</fn></fc>"
|
||||
echo "<fc=#696B71><fn=3></fn></fc>"
|
||||
elif [ "$VOLUME" -le 20 ]; then
|
||||
echo "<fc=#DFDFDF><fn=3>奔</fn><fn=2> $VOLUME</fn></fc>"
|
||||
echo "<fc=#DFDFDF><fn=3></fn><fn=2> $VOLUME</fn></fc>"
|
||||
else
|
||||
echo "<fc=#DFDFDF><fn=3>墳</fn><fn=2> $VOLUME</fn></fc>"
|
||||
echo "<fc=#DFDFDF><fn=3></fn><fn=2> $VOLUME</fn></fc>"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue