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.

71 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
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. quark
  14. devmon
  15. emacs
  16. mpd
  17. mpDris2"
  18. # Open menu
  19. selection=$(printf '%s' "$items" | $DMENU)
  20. case $selection in
  21. dwm)
  22. kill -9 $(pidof dwm)
  23. ;;
  24. dwmblocks)
  25. kill -9 $(pidof dwmblocks)
  26. dwmblocks > $XDG_RUNTIME_DIR/dwmblocks.out 2> $XDG_RUNTIME_DIR/dwmblocks.err &
  27. ;;
  28. mconnect)
  29. kill -9 $(pidof mconnect)
  30. (cd ~/Downloads/mconnect; mconnect -d > $XDG_RUNTIME_DIR/mconnect 2> $XDG_RUNTIME_DIR/mconnect.err &)
  31. ;;
  32. clipmenud)
  33. pkill -f clipmenud
  34. clipmenud > $XDG_RUNTIME_DIR/clipmenud.out 2> $XDG_RUNTIME_DIR/clipmenud.err &
  35. ;;
  36. mpd)
  37. kill -9 $(pidof mpd)
  38. mpd &
  39. mpd-mpris &
  40. ;;
  41. mpDris2)
  42. kill -9 $(pidof mpDris2)
  43. mpDris2 &
  44. ;;
  45. dunst)
  46. kill -9 $(pidof dunst)
  47. dunst &
  48. ;;
  49. emacs)
  50. emacsclient -e '(kill-emacs)'
  51. emacs --daemon && emacsclient -c --eval "(delete-frame)"
  52. ;;
  53. devmon)
  54. pkill -f devmon
  55. ~/.local/bin/devmon --exec-on-drive "/sbin/notify-send '禍 drive mounted' '%l (%f) at %d '" \
  56. --exec-on-remove "/sbin/notify-send '禍 drive removed' '%l (%f) from %d '" \
  57. --exec-on-unmount "/sbin/notify-send '禍 drive unmounted' '%l (%f) from %d '" \
  58. --no-unmount --no-gui &
  59. ;;
  60. quark)
  61. sudo systemctl restart quark
  62. ;;
  63. esac
  64. exit