From b361a1b4c725ecea09cc8c25e0ca4e8f306bebd6 Mon Sep 17 00:00:00 2001 From: BardofSprites <89086143+BardofSprites@users.noreply.github.com> Date: Mon, 28 Oct 2024 23:26:13 -0400 Subject: emacs app launcher script --- bin/.local/bin/scripts/emacs-launcher | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 bin/.local/bin/scripts/emacs-launcher (limited to 'bin') 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 -- cgit v1.2.3