aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2024-10-28 23:26:13 -0400
committerBardofSprites <[email protected]>2024-10-28 23:26:13 -0400
commitb361a1b4c725ecea09cc8c25e0ca4e8f306bebd6 (patch)
tree37b32b3b7274597dd423f21cbd841a340defd802
parentc2648e3cd490cd19b6302bbfa7eea837981ba570 (diff)
emacs app launcher script
-rwxr-xr-xbin/.local/bin/scripts/emacs-launcher35
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