1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-29 03:21:31 +00:00

Add emojies to statusbar

using JoyPixels font
This commit is contained in:
Horhik 2020-12-03 23:13:31 +02:00
parent 8202e4d02f
commit f5e801c462

View file

@ -7,22 +7,22 @@ val=$(acpi | grep -oh "[[:digit:]]*%" | grep -oh "[0-9]*")
case $val in case $val in
[1-9][0-9][0-9]) [1-9][0-9][0-9])
echo " $val a %" echo "🔋 val%"
;; ;;
[5-9][0-9]) [5-9][0-9])
echo " $val a%" echo " $val%"
;; ;;
[1-4][0-9]) [1-4][0-9])
echo " $val %a" echo " $val%"
;; ;;
[1-9]) [1-9])
echo " $val %a" echo " $val%"
;; ;;
0) 0)
echo  echo ""
;; ;;
*) *)
echo " $val %a" echo "🔋 $val %"
;; ;;
esac esac
} }
@ -30,37 +30,39 @@ esac
volume () volume ()
{ {
val=$(amixer sget Master | grep 'Right:' | awk -F'[][]' '{ print $2 }'| grep -oh "[0-9]*") #maybe change to Right, Left, Mono
val=$(amixer sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }'| grep -oh "[0-9]*")
case $val in case $val in
100) 100)
echo $val% echo 🔊 $val%
;; ;;
[5-9][0-9]) [5-9][0-9])
echo $val% echo 🔉 $val%
;; ;;
[1-4][0-9]) [1-4][0-9])
echo 奔 $val% echo 🔈 $val%
;; ;;
[1-9]) [1-9])
echo $val% echo 🔈 $val%
;; ;;
0) 0)
echo echo 🔇
;; ;;
esac esac
} }
diskspace () diskspace ()
{ {
echo  $(df -h | grep sda5 | grep -oh "[0-9]*%") #might be another /dev/sda...
echo 💽 $(df -h | grep sda2 | grep -oh "[0-9]*%")
} }
wifi () wifi ()
{ {
name=$(connmanctl services | grep "*AO" | grep -oh "^*AO [A-Za-z]*" | grep -oh "[[:space:]][A-Za-x]*") name=$(connmanctl services | grep "*A" | grep -oh "^*A. [A-Za-z]*" | grep -oh "[[:space:]][A-Za-x]*")
if [ $name != " " ]; if [ $name != " " ];
then then
echo $name echo 🌐 $name
else else
echo 睊 off echo 睊 off
fi fi
@ -68,13 +70,19 @@ if [ $name != " " ];
layout () layout ()
{ {
echo $(xkblayout-state print %s) echo 🎌 $(xkblayout-state print %s)
} }
timeanddate () timeanddate ()
{ {
echo  $(date) echo 🕑 $(date +'%T') #%r
} }
echo " [$(wifi)] [$(battery)] [$(volume)] [$(layout)] [$(diskspace)] [$(timeanddate)] "
calendar ()
{
echo 📅 $(date +'%d/%m/%Y')
}
echo "[$(wifi)] [$(battery)] [$(volume)] [$(layout)] [$(diskspace)] [$(timeanddate) $(calendar)]"