Looser GUI editor handling in omarchy-launch-editor script (#1702)

* fix: Default to nvim if $EDITOR not set in omarchy-launch-editor

Refs: https://github.com/basecamp/omarchy/pull/1697/files#r2352727184

* fix: Handle $EDITOR as GUI application by default

If we do not definitively handle $EDITOR as a known TUI editor,
assume a GUI editor and launch without using the terminal.

Refs: https://github.com/basecamp/omarchy/pull/1697/files#r2352727184
This commit is contained in:
Simon Dawson
2025-09-16 20:53:51 +01:00
committed by GitHub
parent b9dfbb8f4c
commit 654723aa7f

View File

@@ -1,13 +1,10 @@
#!/bin/bash
case "$EDITOR" in
case "${EDITOR:-nvim}" in
nvim | vim | nano | micro | hx)
exec setsid uwsm app -- "$TERMINAL" -e "$EDITOR" "$@"
;;
code | codium | subl | gedit | kate | zeditor)
*)
exec setsid uwsm app -- "$EDITOR" "$@"
;;
*)
exec setsid uwsm app -- "$TERMINAL" -e nvim "$@"
;;
esac