My scripts for startup, dmenu, and the command line
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.

85 lines
1.6 KiB

  1. #!/bin/sh
  2. launch() {
  3. app=$(printf "Notes
  4. Files
  5. Editor
  6. Terminal
  7. Multiplexer
  8. LBRY
  9. Chat
  10. Music
  11. Browser
  12. Email
  13. Processes" |
  14. dmenu -i -p "Launcher")
  15. case $app in
  16. Notes) st -e vim "+cd ~/Notes/text" "+CtrlP";;
  17. Files) st -e nnn;;
  18. Editor) st -e vim;;
  19. Terminal) st;;
  20. Multiplexer) st -e tmux $*;;
  21. LBRY) lbry;;
  22. Chat) element-desktop;;
  23. Music) st -e ncmpcpp;;
  24. Browser) brave-browser;;
  25. Email) brave-browser mail.protonmail.com/login;;
  26. Processes) st -e htop;;
  27. esac
  28. }
  29. action() {
  30. action=$(printf "Play Music
  31. Pause Music
  32. Toggle Music
  33. Select VPN
  34. Disable VPN
  35. Enable VPN
  36. VPN Status
  37. Rebind Keys
  38. Disable Bar
  39. Enable Bar" |
  40. dmenu -i -p "Actions")
  41. case $action in
  42. 'Play Music') mpc play ;;
  43. 'Pause Music') mpc pause ;;
  44. 'Toggle Music') mpc toggle ;;
  45. 'Rebind Keys') setup-xbindkeys;;
  46. 'Disable Bar') tmux set -g status off;;
  47. 'Enable Bar') tmux set -g status on;;
  48. esac
  49. }
  50. screenshot() {
  51. method=$(printf "clipboard
  52. file
  53. both" |
  54. dmenu -i -p "Screenshot")
  55. if test $method = "file"; then
  56. scrot --note "-f 'LiterationSans Nerd Font Book/11' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"\
  57. -s ~/Pictures/screenshots/screenshot-%Y-%m-%d_$wx$h.png
  58. fi
  59. }
  60. if test $method = "clipboard"; then
  61. scrot --note "-f 'LiterationSans Nerd Font Book/11' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"\
  62. -s ~/Pictures/screenshots/screenshot-%Y-%m-%d_$wx$h.png\
  63. -e "xclip $f; rm $f"
  64. fi
  65. if test $method = "both"; then
  66. scrot --note "-f 'LiterationSans Nerd Font Book/11' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"\
  67. -s ~/Pictures/screenshots/screenshot-%Y-%m-%d_$wx$h.png\
  68. -e "xclip $f;"
  69. fi
  70. case $1 in
  71. launch) launch;;
  72. action) action;;
  73. cmd) action;;
  74. ddg) action;;
  75. *) printf "Invalid argument";;
  76. esac