My configuration files for Debian/Ubuntu applications
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

64 řádky
1.2 KiB

  1. #!/bin/bash
  2. source ~/.profile
  3. # Setup statusbar and mail
  4. speaker_muted=🔇
  5. speaker_low=🔈
  6. speaker_medium=🔉
  7. speaker_high=🔊
  8. brightness_symbol=🔅
  9. # Check number of unread emails
  10. messages() {
  11. printf "$(find ~/Mail -path '*INBOX*' -not -name \
  12. '.uidvalidity' -type f | grep -vE ',[^,]*S[^,]*$'| wc -l)"
  13. }
  14. DELAY=10m
  15. while true; do
  16. mbsync -a
  17. sleep $DELAY
  18. done &
  19. while true; do
  20. volume=$(amixer sget Master | awk -F"[][]" 'END{ print $2 }')
  21. volume_amount=$(printf $volume | tr -d %)
  22. if [ $volume_amount = 0 ]; then
  23. volume_symbol=$speaker_muted
  24. elif [ $volume_amount -lt 30 ]; then
  25. volume_symbol=$speaker_low
  26. elif [ $volume_amount -lt 70 ]; then
  27. volume_symbol=$speaker_medium
  28. else
  29. volume_symbol=$speaker_high
  30. fi
  31. xsetroot -name "📧Messages $(messages) |
  32. $volume_symbol$volume | $(date +"%c")"
  33. sleep $DELAY
  34. done &
  35. setxkbmap -option ctrl:swapcaps -option tilde:swapescape
  36. picom -b
  37. ~/.fehbg
  38. xbindkeys -f $HOME/Source/configs/xbindkeysrc
  39. ( mru update; mru updatedirs ) &
  40. # Relaunch DWM if the binary changes, otherwise bail
  41. csum=$(sha1sum $(which dwm))
  42. new_csum=""
  43. while true
  44. do
  45. if [ "$csum" != "$new_csum" ]
  46. then
  47. csum=$new_csum
  48. dwm
  49. else
  50. exit 0
  51. fi
  52. new_csum=$(sha1sum $(which dwm))
  53. sleep 0.5
  54. done