Skip to content

Omarchy shell migration prep and menu selector compatibility#12

Draft
timmo001 wants to merge 6 commits into
distro/arch-omarchyfrom
omarchy-quickshell-menu-prep
Draft

Omarchy shell migration prep and menu selector compatibility#12
timmo001 wants to merge 6 commits into
distro/arch-omarchyfrom
omarchy-quickshell-menu-prep

Conversation

@timmo001
Copy link
Copy Markdown
Owner

@timmo001 timmo001 commented Jun 1, 2026

Summary

Prepares shell scripts for the Omarchy 4 Quickshell migration by abstracting menu selection behind a compatibility helper, refactoring duplicated systemd doctor checks, and adding a dbus-based resume monitor.

Supersedes PR #11 (closed).

Commits

  1. Prepare Omarchy shell script migrationon-resume script with shell indicator refresh, migration plan docs
  2. Add Omarchy shell resume monitor — dbus sleep/wake monitor (on-resume-monitor), systemd user service
  3. Check resume monitor in dot doctor — doctor check for monitor script + unit presence and enablement
  4. Document Omarchy Quickshell migration plandot-migration/omarchy-quickshell/README.md checklist
  5. Refactor: deduplicate systemd doctor checks and inline resume helper — shared checkRequiredUserUnitSetup generic, constants, inlined run_resume_recovery()
  6. Feat: add Omarchy menu selector compatibilitymenu_select() helper in twitch-menu, workspace-menu, workspace-relayout

Menu Selector Compatibility

Added menu_select() helper to three scripts that:

  1. Prefers omarchy-menu-select with positional args (works on Omarchy 3 Walker-backed and Omarchy 4 shell-IPC-backed versions)
  2. Falls back to omarchy-launch-walker --dmenu for environments without omarchy-menu-select
  3. Passes options as args (not stdin) for cross-version compatibility
  4. Omits trailing ellipsis from prompts (omarchy-menu-select appends its own)

workspace-relayout also adds a menu_selector_available() guard and generic error notification.

Doctor Check Refactor

  • Extracted RequiredUserUnitSetup interface and checkRequiredUserUnitSetup generic helper
  • Consolidated checkDoctorStartup and checkResumeMonitor into declarative config objects
  • Added shared constants: USER_SYSTEMD_DIR, userSystemdUnitPath(), DOCTOR_STARTUP_NOTIFY_SCRIPT, RESUME_MONITOR_SCRIPT
  • No behaviour change; all messages, severities, and guidance preserved

Validation

  • bash -n passes on all modified shell scripts
  • bunx tsc --noEmit passes
  • bun run build passes
  • bun run format applied (no unformatted code)
  • Fallow audit: pass (0 introduced dead code, 0 new complexity, 0 duplication)

Context

This is prep work for the Omarchy 4 Quickshell migration. On Omarchy 3, omarchy-menu-select is Walker-backed and requires ≥2 args. Omarchy 4 replaces it with a shell-IPC-backed version that also accepts stdin. By abstracting behind menu_select(), these scripts will work on both versions without modification when the shell migration happens.

timmo001 added 6 commits May 31, 2026 19:41
- Extract RequiredUserUnitSetup interface and checkRequiredUserUnitSetup
  generic helper to consolidate checkDoctorStartup and checkResumeMonitor
- Add USER_SYSTEMD_DIR, userSystemdUnitPath(), and script path constants
- Inline single-use run_resume_recovery() in on-resume-monitor
- Reuse userSystemdUnitPath in daily volume reset check

No behaviour change; all check messages, severities, and guidance preserved.
Add menu_select() helper to twitch-menu, workspace-menu, and
workspace-relayout that prefers omarchy-menu-select (args-based) and
falls back to omarchy-launch-walker --dmenu.

- Options passed as positional args for Omarchy 3 and 4 compatibility
- Prompts omit trailing ellipsis (omarchy-menu-select appends its own)
- Walker fallback still appends ellipsis in the prompt flag
- workspace-relayout adds menu_selector_available() guard and uses a
  generic missing-selector notification instead of Walker-specific one

Prepares these scripts for Omarchy 4 Quickshell migration where
omarchy-menu-select becomes shell-IPC-backed instead of Walker-backed.
@timmo001 timmo001 changed the title Refactor doctor checks and add Omarchy menu selector compatibility Omarchy shell migration prep and menu selector compatibility Jun 1, 2026
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.

1 participant