My configuration files for Debian/Ubuntu applications
 
 
 
 
 
 

58 lines
1.1 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. DELAY=1m
  10. while true; do
  11. mbsync -a
  12. sleep $DELAY
  13. done &
  14. while true; do
  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 &
  30. setxkbmap -option ctrl:swapcaps -option tilde:swapescape
  31. picom -b
  32. ~/.fehbg
  33. xbindkeys -f $HOME/Source/configs/xbindkeysrc
  34. ( mru update; mru updatedirs ) &
  35. # Relaunch DWM if the binary changes, otherwise bail
  36. csum=$(sha1sum $(which dwm))
  37. new_csum=""
  38. while true
  39. do
  40. if [ "$csum" != "$new_csum" ]
  41. then
  42. csum=$new_csum
  43. dwm
  44. else
  45. exit 0
  46. fi
  47. new_csum=$(sha1sum $(which dwm))
  48. sleep 0.5
  49. done