Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

79 lines
2.3 KiB

4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #!/bin/bash
  2. function restart_if_fails(){
  3. until bash -c "$1"; do
  4. echo "$1 exited with code $?. Restarting in 1 second..."
  5. sleep 1
  6. done &
  7. }
  8. ~/.local/bin/daily-update
  9. dwmblocks > $XDG_RUNTIME_DIR/dwmblocks.out 2> $XDG_RUNTIME_DIR/dwmblocks.err &
  10. restart_if_fails "clipmenud > $XDG_RUNTIME_DIR/clipmenud.out 2> $XDG_RUNTIME_DIR/clipmenud.err"
  11. darkhttpd $HOME/.local/share/startpage/dist --port 9999 --daemon --addr 127.0.0.1
  12. restart_if_fails dunst
  13. restart_if_fails "xbanish"
  14. # Start emacs
  15. # restart_if_fails "emacs --daemon && emacsclient -c --eval \"(delete-frame)\""
  16. # ~/.local/bin/firefox-sync &
  17. if [ "$ACTIVITYWATCHER" = true ] ; then
  18. pkill -f aw-watcher-window
  19. pkill -f aw-watcher-afk
  20. pkill -f aw-server
  21. aw-server &
  22. aw-watcher-window &
  23. aw-watcher-afk &
  24. fi
  25. if [ "$ARIA2C" = true ] ; then
  26. restart_if_fails "aria2c --async-dns=false --enable-rpc --rpc-secret '$ARIA2C_SECRET'"
  27. fi
  28. # Only run these if we are not in a VNC session
  29. if ! xpdyinfo | grep -q VNC ; then
  30. redshift -x 2> /dev/null > /dev/null
  31. redshift -r -l "$LATLONG" > /dev/null 2> /dev/null &
  32. if [ "$SPOTIFYD" = true ] ; then
  33. spotifyd
  34. fi
  35. ~/.local/bin/devmon --exec-on-drive "notify-send -a '禍 drive mounted' '%l (%f) at %d '" \
  36. --exec-on-remove "notify-send -a '禍 drive removed' '%l (%f) from %d '" \
  37. --exec-on-unmount "notify-send -a '禍 drive unmounted' '%l (%f) from %d '" \
  38. --no-unmount --no-gui &
  39. ~/.local/bin/keyboard > $XDG_RUNTIME_DIR/keyboard.out 2> $XDG_RUNTIME_DIR/keyboard.err &
  40. touch ~/.cache/nextcloud-track
  41. restart_if_fails "xss-lock -- slock"
  42. ~/.local/bin/mailsync &
  43. for i in $XDG_CONFIG_HOME/goimapnotify/*; do
  44. m="$(echo "$i" | sed "s/.*\///g")"
  45. restart_if_fails "goimapnotify -conf $i > $XDG_RUNTIME_DIR/$m.watch.out 2> $XDG_RUNTIME_DIR/$m.watch.err"
  46. done
  47. if [ "$NEXTCLOUD" = true ] ; then
  48. nextcloud --background &
  49. fi
  50. mkdir -p ~/Downloads/neomutt
  51. if [ "$MCONNECT" = true ] ; then
  52. mkdir -p ~/Downloads/mconnect
  53. (cd ~/Downloads/mconnect; restart_if_fails "mconnect -d > $XDG_RUNTIME_DIR/mconnect 2> $XDG_RUNTIME_DIR/mconnect.err")
  54. fi
  55. restart_if_fails "picom --no-fading-openclose"
  56. restart_if_fails "xfce4-power-manager"
  57. curl 'http://yeetclock/setcolor?R=136&G=192&B=208' &
  58. fi