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.

70 lines
1.4 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #!/bin/sh
  2. killprogs() {
  3. pkill -x udisks-glue
  4. pkill -x panel
  5. pkill -x redshift
  6. }
  7. DMENU='dmenu -z 1900 -x 10 -y 10 -i'
  8. items="dwm
  9. dwmblocks
  10. mconnect
  11. dunst
  12. clipmenud
  13. darkhttpd
  14. devmon
  15. activitywatcher
  16. spotifyd"
  17. # Open menu
  18. selection=$(printf '%s' "$items" | $DMENU)
  19. case $selection in
  20. dwm)
  21. kill -9 $(pidof dwm)
  22. ;;
  23. dwmblocks)
  24. kill -9 $(pidof dwmblocks)
  25. dwmblocks > $XDG_RUNTIME_DIR/dwmblocks.out 2> $XDG_RUNTIME_DIR/dwmblocks.err &
  26. ;;
  27. mconnect)
  28. kill -9 $(pidof mconnect)
  29. (cd ~/Downloads/mconnect; mconnect -d > $XDG_RUNTIME_DIR/mconnect 2> $XDG_RUNTIME_DIR/mconnect.err &)
  30. ;;
  31. clipmenud)
  32. pkill -f clipmenud
  33. clipmenud > $XDG_RUNTIME_DIR/clipmenud.out 2> $XDG_RUNTIME_DIR/clipmenud.err &
  34. ;;
  35. spotifyd)
  36. kill -9 $(pidof spotifyd)
  37. spotifyd
  38. ;;
  39. dunst)
  40. kill -9 $(pidof dunst)
  41. dunst &
  42. ;;
  43. activitywatcher)
  44. pkill -f aw-watcher-window
  45. pkill -f aw-watcher-afk
  46. pkill -f aw-server
  47. aw-server &
  48. aw-watcher-window &
  49. aw-watcher-afk &
  50. ;;
  51. devmon)
  52. pkill -f devmon
  53. ~/.local/bin/devmon --exec-on-drive "/sbin/notify-send '禍 drive mounted' '%l (%f) at %d '" \
  54. --exec-on-remove "/sbin/notify-send '禍 drive removed' '%l (%f) from %d '" \
  55. --exec-on-unmount "/sbin/notify-send '禍 drive unmounted' '%l (%f) from %d '" \
  56. --no-unmount --no-gui &
  57. ;;
  58. darkhttpd)
  59. killall -9 darkhttpd
  60. darkhttpd $HOME/.local/share/startpage/dist --port 9999 --daemon --addr 127.0.0.1
  61. ;;
  62. esac
  63. exit