From 8c21318c5383e63477dc94986e9052eeb108d601 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 25 Apr 2024 17:19:54 +0200 Subject: emacs: add raycast script to open Emacs.app with shell environment --- user/emacs/raycast-script.applescript | 12 ++++++++++++ user/settings/emacs.nix | 4 ++++ 2 files changed, 16 insertions(+) create mode 100755 user/emacs/raycast-script.applescript diff --git a/user/emacs/raycast-script.applescript b/user/emacs/raycast-script.applescript new file mode 100755 index 00000000..d2e97c95 --- /dev/null +++ b/user/emacs/raycast-script.applescript @@ -0,0 +1,12 @@ +#!/usr/bin/osascript + +# Required parameters: +# @raycast.schemaVersion 1 +# @raycast.title Emacs +# @raycast.mode silent + +# Optional parameters: +# @raycast.icon https://www.gnu.org/software/emacs/images/emacs.png +# @raycast.packageName Emacs + +do shell script "$SHELL -c \"open -a ~/.nix-profile/Applications/Emacs.app\"" diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix index 72125c95..4b74f7ca 100644 --- a/user/settings/emacs.nix +++ b/user/settings/emacs.nix @@ -175,6 +175,10 @@ in home.packages = with pkgs; [ editorScript ]; + xdg.configFile."raycast/scripts/Emacs" = { + executable = true; + source = ../emacs/raycast-script.applescript; + }; xdg.configFile."emacs/early-init.el" = { source = ../emacs/early-init.el; }; -- cgit 1.4.1