Skip to content

[Improvement] User hook directories for omacase events (hooks/<event>.d) #23

Description

@splaice

Quattro feature

Omarchy 4 runs user-owned executable scripts from ~/.config/omarchy/hooks/<event>.d/ at defined moments: theme-set.d (theme slug in $1), post-update.d, post-boot.d, battery-low.d, font-set.d. It makes the system user-extensible without forking.

Omacase fit

Omacase already has the natural firing points and the config-dir precedent (~/.config/omacase/login-items):

  • theme-set.d — end of omacase theme (slug in $1); lets users retarget apps Omacase doesn't theme
  • post-update.d — end of omacase update
  • post-login.d — OmacaseLauncher runs it after opening login-items (generalizes the launcher beyond open -a)
  • pre-backup.d / post-restore.d — optional later

Proposed shape

  • run_hooks <event> [args…] in lib/common.sh: iterate ~/.config/omacase/hooks/<event>.d/*, executable files only, each with a timeout, failures warn-not-abort, skipped entirely in dry-run with a log line
  • Call sites at the three events above; document in README; doctor warns on non-executable hook files
  • Security note in the header: hooks are user-owned arbitrary code by design (same trust as shell rc files); Omacase never ships hook content

Scope

Future release. High leverage for small code; also the extension point that keeps feature requests from becoming core code.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementSystemic improvement for a future release — not a defectquattro-parityInspired by Omarchy 4 Quattro — evaluate for Omacase parity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions