From f5e801c46210d678c6fdc3b4b9c72d7ac0fee30a Mon Sep 17 00:00:00 2001 From: Horhik Date: Thu, 3 Dec 2020 23:13:31 +0200 Subject: [PATCH] Add emojies to statusbar using JoyPixels font --- home/scripts/.local/scripts/status/statusbar | 44 ++++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/home/scripts/.local/scripts/status/statusbar b/home/scripts/.local/scripts/status/statusbar index 840f9c8..cea57c2 100755 --- a/home/scripts/.local/scripts/status/statusbar +++ b/home/scripts/.local/scripts/status/statusbar @@ -7,22 +7,22 @@ val=$(acpi | grep -oh "[[:digit:]]*%" | grep -oh "[0-9]*") case $val in [1-9][0-9][0-9]) - echo "ī‰€ $val a %" + echo "🔋 val%" ;; [5-9][0-9]) - echo "ī‰ $val a%" + echo "ī‰ $val%" ;; [1-4][0-9]) - echo "ī‰‚ $val %a" + echo "ī‰‚ $val%" ;; [1-9]) - echo "ī‰ƒ $val %a" + echo "ī‰ƒ $val%" ;; 0) - echo ī‰„ + echo "ī‰„ " ;; *) - echo "ī‰€ $val %a" + echo "🔋 $val %" ;; esac } @@ -30,37 +30,39 @@ esac 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 100) - echo īŠŊ $val% + echo 🔊 $val% ;; [5-9][0-9]) - echo īŠŊ $val% + echo 🔉 $val% ;; [1-4][0-9]) - echo īŠŋ $val% + echo 🔈 $val% ;; [1-9]) - echo īŠž $val% + echo 🔈 $val% ;; 0) - echo īĒ€ + echo 🔇 ;; esac } 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 () { - 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 != " " ]; then - echo īĒ¨ $name + echo 🌐 $name else echo īĒŠ off fi @@ -68,13 +70,19 @@ if [ $name != " " ]; layout () { - echo ī†Ģ $(xkblayout-state print %s) + echo 🎌 $(xkblayout-state print %s) } 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)]"