diff --git a/bin/omarchy-launch-editor b/bin/omarchy-launch-editor index 7597cfccb2..bce59c51be 100755 --- a/bin/omarchy-launch-editor +++ b/bin/omarchy-launch-editor @@ -6,6 +6,14 @@ case "$EDITOR" in nvim | vim | nano | micro | hx | helix) exec omarchy-launch-tui "$EDITOR" "$@" ;; +emacs) + # If emacs.service is active open a new frame instead of a whole new emacs. + if systemctl --user is-active emacs.service >/dev/null 2>&1; then + exec setsid uwsm-app -- emacsclient -n -r "$@" + else + exec setsid uwsm-app -- emacs "$@" + fi + ;; *) exec setsid uwsm-app -- "$EDITOR" "$@" ;;