diff options
Diffstat (limited to 'bin/.local')
| -rwxr-xr-x | bin/.local/bin/scripts/emacs-launcher | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bin/.local/bin/scripts/emacs-launcher b/bin/.local/bin/scripts/emacs-launcher new file mode 100755 index 0000000..6210bd4 --- /dev/null +++ b/bin/.local/bin/scripts/emacs-launcher @@ -0,0 +1,35 @@ +#!/bin/bash + +run_command () +{ + emacsclient -c -e $1 +} + +options=("calendar" "agenda" "music" "scratch") + +if [ $# -eq 0 ]; then + choice=$(printf "%s\n" "${options[@]}" | dmenu -i -p "Choose an option:") +else + choice="$1" +fi + +case $choice in + "calendar") + command="(cfw:open-org-calendar)" + run_command $command + ;; + "agenda") + command="(bard/default-agenda)" + run_command $command + ;; + "music") + command="(emms)" + run_command $command + ;; + "scratch") + scratch.sh + ;; + "*") + exit 1; + ;; +esac |
