diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-03-01 18:31:32 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-03-01 18:35:18 +0530 |
| commit | 241e40ad8023922be73213a518c9624f737de066 (patch) | |
| tree | 5f47daadcca38c43f72eaf2bdb019b47a5636c01 /scripts | |
| parent | 0ae7cfc4746d7934fbea947388151b1818cdba87 (diff) | |
| download | nixos-config-241e40ad8023922be73213a518c9624f737de066.tar.gz nixos-config-241e40ad8023922be73213a518c9624f737de066.zip | |
Change font
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/menuitems.sh | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/scripts/menuitems.sh b/scripts/menuitems.sh index 7781e57..505b610 100755 --- a/scripts/menuitems.sh +++ b/scripts/menuitems.sh @@ -13,12 +13,24 @@ playerctl_icon() { esac } + +playerctl_prefix() { + local playstate="$(~/scripts/music/player.sh get_play_state)"; + case "$playstate" in + Paused) echo "" ;; + Playing) echo "PLAYING: " ;; + Stopped) echo "" ;; + *) ;; + esac +} + network_state() { local status=$((nmcli dev show wlp0s20f3 || echo "") | grep '^GENERAL.STATE:' | sed 's/^GENERAL.STATE:\s*//g'); - echo " ${status:0:16}"; + echo " ${status:0:16}"; } -volume_icon() { volume_component 4 | sed 's/on//; s/off/🔇/'; } +# volume_icon() { volume_component 4 | sed 's/on//; s/off/🔇/'; } +volume_icon() { volume_component 4 | sed 's/on/VOL/; s/off/MUTE/'; } mic_icon() { mic_component 4 | sed 's/on//; s/off/✖/'; } icon() { @@ -34,17 +46,19 @@ icon() { } date_module() { - echo "$(icon date) $(date +"%A, %e %b - %I:%M %p")"; + # echo "$(icon date) $(date +"%A, %e %b - %I:%M %p")"; + echo "$(date +"%A, %e %b - %I:%M %p")"; } battery_module() { local capacity=$(cat "/sys/class/power_supply/BAT0/capacity"); - echo "$(icon battery) $capacity%"; + # echo "$(icon battery) $capacity%"; + echo "BAT: $capacity%"; } music_module() { local label=$(~/scripts/music/player.sh get_label); - echo "$(icon music) $label"; + echo "$(playerctl_prefix)$label"; } brightness_module() { @@ -52,7 +66,7 @@ brightness_module() { } volume_module() { - echo "$(icon volume) $(volume_component 2)"; + echo "$(icon volume): $(volume_component 2)"; } keymode_module() { |
