My scripts for startup, dmenu, and the command line
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
595 B

  1. #!/bin/sh
  2. speaker_muted=🔇
  3. speaker_low=🔈
  4. speaker_medium=🔉
  5. speaker_high=🔊
  6. brightness_symbol=🔅
  7. # Statusbar loop
  8. while true; do
  9. volume=$(amixer sget Master | awk -F"[][]" 'END{ print $2 }')
  10. volume_amount=$(printf $volume | tr -d %)
  11. if [ $volume_amount == 0 ]; then
  12. volume_symbol=$speaker_muted
  13. elif [ $volume_amount -lt 30 ]; then
  14. volume_symbol=$speaker_low
  15. elif [ $volume_amount -lt 70 ]; then
  16. volume_symbol=$speaker_medium
  17. else
  18. volume_symbol=$speaker_high
  19. fi
  20. xsetroot -name "$volume_symbol$volume | $(date +"%c")"
  21. sleep 1m # Update time every minute
  22. done