mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-02 04:37:49 +02:00
24 lines
505 B
Bash
Executable File
24 lines
505 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Launch the default editor selected via Omarchy defaults.
|
|
# omarchy:args=<path>
|
|
|
|
editor_file="$HOME/.local/state/omarchy/defaults/editor"
|
|
editor="nvim"
|
|
|
|
if [[ -f $editor_file ]]; then
|
|
read -r editor <"$editor_file"
|
|
fi
|
|
|
|
[[ -n $editor ]] || editor="nvim"
|
|
omarchy-cmd-present "$editor" || editor="nvim"
|
|
|
|
case "${editor##*/}" in
|
|
nvim | vim | nano | micro | hx | helix | fresh)
|
|
exec omarchy-launch-tui "$editor" "$@"
|
|
;;
|
|
*)
|
|
exec setsid uwsm-app -- "$editor" "$@"
|
|
;;
|
|
esac
|