hooks.md
267 tokens · o200k_base · 1,063 bytes
Source excerpt starting at line 1.# Automation Hooks Read this before setting up scripts that run on system events (theme changes,updates, boot, low battery, etc.). Hooks live in `~/.config/omarchy/hooks/<name>.d/` — one directory per event,holding any number of independent scripts. Install with`omarchy hook install <name> <script>` (copies the script in and makes itexecutable). The runner also executes a flat `~/.config/omarchy/hooks/<name>`file first, if one exists. ```~/.config/omarchy/hooks/├── battery-low.d/ # Low battery (percentage in $1)├── font-set.d/ # After font change (font name in $1)├── post-boot.d/ # After the desktop starts├── post-update.d/ # During `omarchy update`, after system packages and migrations├── pre-refresh-pacman.d/ # Before `omarchy refresh pacman` re-syncs packages└── theme-set.d/ # After theme change (theme slug in $1)``` Example hook script:```bash#!/bin/bashTHEME_NAME=$1echo "Theme changed to: $THEME_NAME"# Add custom actions here```
Referenced from SKILL.md
Source excerpt starting at line 46.- [`theming.md`](theming.md) - themes, backgrounds, and fonts- [`hooks.md`](hooks.md) - automation hooks that run on system events- [`capture.md`](capture.md) - screenshots, screen recordings, OCR text capture, and file sharing
Source excerpt starting at line 254.3. **Is it a theme customization?** Follow [`theming.md`](theming.md); create a NEW custom theme directory4. **Is it automation?** Follow [`hooks.md`](hooks.md); use `omarchy hook install` and the hook `.d` directories5. **Is it a package install?** Use `omarchy pkg add <pkgs...>` (or `omarchy pkg aur add <pkgs...>` for AUR-only packages)