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.

66 lines
1.3 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. emacs
  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. emacs)
  44. emacsclient -e '(kill-emacs)'
  45. emacs --daemon && emacsclient -c --eval "(delete-frame)"
  46. ;;
  47. devmon)
  48. pkill -f devmon
  49. ~/.local/bin/devmon --exec-on-drive "/sbin/notify-send '禍 drive mounted' '%l (%f) at %d '" \
  50. --exec-on-remove "/sbin/notify-send '禍 drive removed' '%l (%f) from %d '" \
  51. --exec-on-unmount "/sbin/notify-send '禍 drive unmounted' '%l (%f) from %d '" \
  52. --no-unmount --no-gui &
  53. ;;
  54. darkhttpd)
  55. killall -9 darkhttpd
  56. darkhttpd $HOME/.local/share/startpage/dist --port 9999 --daemon --addr 127.0.0.1
  57. ;;
  58. esac
  59. exit