My scripts for startup, dmenu, and the command line
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
701 B

  1. #!/bin/sh
  2. speaker_muted=🔇
  3. speaker_low=🔈
  4. speaker_medium=🔉
  5. speaker_high=🔊
  6. brightness_symbol=🔅
  7. DELAY=1m
  8. # Statusbar loop
  9. while true; do
  10. mbsync -a
  11. sleep $DELAY
  12. done &
  13. while true; do
  14. mail
  15. volume=$(amixer sget Master | awk -F"[][]" 'END{ print $2 }')
  16. volume_amount=$(printf $volume | tr -d %)
  17. if [ $volume_amount = 0 ]; then
  18. volume_symbol=$speaker_muted
  19. elif [ $volume_amount -lt 30 ]; then
  20. volume_symbol=$speaker_low
  21. elif [ $volume_amount -lt 70 ]; then
  22. volume_symbol=$speaker_medium
  23. else
  24. volume_symbol=$speaker_high
  25. fi
  26. xsetroot -name "📧Messages $(find ~/Mail -path '*/INBOX/new' -type f | wc -l) |
  27. $volume_symbol$volume | $(date +"%c")"
  28. sleep $DELAY
  29. done