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