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.

75 lines
2.0 KiB

4 years ago
  1. #!/bin/sh
  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. redshift -x 2> /dev/null > /dev/null
  10. redshift -r -l "$LATLONG" > /dev/null 2> /dev/null &
  11. dwmblocks > $XDG_RUNTIME_DIR/dwmblocks.out 2> $XDG_RUNTIME_DIR/dwmblocks.err &
  12. ~/.local/bin/devmon --exec-on-drive "notify-send -a '禍 drive mounted' '%l (%f) at %d '" \
  13. --exec-on-remove "notify-send -a '禍 drive removed' '%l (%f) from %d '" \
  14. --exec-on-unmount "notify-send -a '禍 drive unmounted' '%l (%f) from %d '" \
  15. --no-unmount --no-gui &
  16. restart_if_fails "clipmenud > $XDG_RUNTIME_DIR/clipmenud.out 2> $XDG_RUNTIME_DIR/clipmenud.err"
  17. darkhttpd $HOME/.local/share/startpage/dist --port 9999 --daemon --addr 127.0.0.1
  18. ~/.local/bin/keyboard > $XDG_RUNTIME_DIR/keyboard.out 2> $XDG_RUNTIME_DIR/keyboard.err &
  19. restart_if_fails dunst
  20. touch ~/.cache/nextcloud-track
  21. restart_if_fails "xss-lock -- slock"
  22. restart_if_fails "picom --no-fading-openclose"
  23. restart_if_fails "xbanish"
  24. # Start emacs
  25. # restart_if_fails "emacs --daemon && emacsclient -c --eval \"(delete-frame)\""
  26. ~/.local/bin/firefox-sync &
  27. ~/.local/bin/mailsync &
  28. for i in $XDG_CONFIG_HOME/goimapnotify/*; do
  29. m="$(echo "$i" | sed "s/.*\///g")"
  30. restart_if_fails "goimapnotify -conf $i > $XDG_RUNTIME_DIR/$m.watch.out 2> $XDG_RUNTIME_DIR/$m.watch.err"
  31. done
  32. if [ "$NEXTCLOUD" = true ] ; then
  33. nextcloud --background &
  34. fi
  35. mkdir -p ~/Downloads/neomutt
  36. if [ "$MCONNECT" = true ] ; then
  37. mkdir -p ~/Downloads/mconnect
  38. (cd ~/Downloads/mconnect; restart_if_fails "mconnect -d > $XDG_RUNTIME_DIR/mconnect 2> $XDG_RUNTIME_DIR/mconnect.err")
  39. fi
  40. if [ "$ACTIVITYWATCHER" = true ] ; then
  41. pkill -f aw-watcher-window
  42. pkill -f aw-watcher-afk
  43. pkill -f aw-server
  44. aw-server &
  45. aw-watcher-window &
  46. aw-watcher-afk &
  47. fi
  48. if [ "$SPOTIFYD" = true ] ; then
  49. spotifyd
  50. fi
  51. mpd
  52. restart_if_fails mpDris2
  53. curl 'http://yeetclock/setcolor?R=136&G=192&B=208' &