Skip to content

Implement omarchy-launch-editor with state-based preference#1048

Closed
jardahrazdera wants to merge 1 commit into
basecamp:devfrom
jardahrazdera:implement-launch-editor
Closed

Implement omarchy-launch-editor with state-based preference#1048
jardahrazdera wants to merge 1 commit into
basecamp:devfrom
jardahrazdera:implement-launch-editor

Conversation

@jardahrazdera
Copy link
Copy Markdown
Contributor

Implements customizable editor support as discussed in #634 and requested by @dhh.

@logannc initially proposed this feature in PR #808. DHH requested a different approach using state files instead of Hyprland environment variables to avoid session restarts.

This PR implements DHH's requested approach:

  • Uses ~/.local/state/omarchy/default/editor to store preference
  • omarchy-launch-editor reads preference from state file, falls back to nvim
  • omarchy-set-editor provides menu interface for selecting default editor
  • Adds Editor option to Setup menu
  • Editor can be changed without restarting Hyprland

Supports terminal editors (nvim, vim, nano, micro, helix) and GUI editors (code, codium, zed, sublime).

Fixes #634

Thanks to @logannc for the initial idea and groundwork in #808.

Implements DHH's requested approach for customizable editor support:
- omarchy-launch-editor reads preference from ~/.local/state/omarchy/default/editor
- omarchy-set-editor provides menu interface for selecting default editor
- Supports both terminal editors (nvim, vim, nano, micro, helix) and GUI editors (code, codium, zed, sublime)
- Replaces hardcoded nvim in omarchy-menu with omarchy-launch-editor
- Adds Editor option to Setup menu for easy configuration

This approach avoids Hyprland env limitations and allows runtime editor changes without session restart.

Fixes basecamp#634
Related to basecamp#808
@dhh
Copy link
Copy Markdown
Member

dhh commented Aug 31, 2025

The great @vaxerski has implemented live ENVs for Hyprland! So on the next release, we'll be able to set EDITOR in top-level envs and be able to rely on that instead of manual state files. Going to hold off for that instead. Thanks for pursuing this, though!

@dhh dhh closed this Aug 31, 2025
@jardahrazdera jardahrazdera deleted the implement-launch-editor branch September 9, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants