Skip to content
Operations
Agent

hooks

Read this before setting up scripts that run on system events (theme changes, updates, boot, low battery, etc.).

From plugin
omarchy
47k16 skills16 agents

Claude Code

$ npx -y skills add omacom/omarchy --agent claude-code

Agent definition

hooks.md

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 it executable). 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/          # At the end of `omarchy update`, after privileged work
├── pre-refresh-pacman.d/   # After `omarchy refresh pacman` re-syncs the package config, before it updates packages
└── theme-set.d/            # After theme change (theme slug in $1)

Example hook script:

#!/bin/bash
THEME_NAME=$1
echo "Theme changed to: $THEME_NAME"
# Add custom actions here

Update-related hooks run as your user with your PATH, inside the update's sudo authorization, so a hook that invokes `sudo` does not prompt again. `post-update` runs after the system packages, migrations and service restarts. `pre-refresh-pacman` runs after `omarchy refresh pacman` re-syncs the package config and before the package transaction, so custom repositories and `IgnorePkg` entries shape that transaction.

Read more
@basecamp
Ships withomarchy

Omarchy is a beautiful, fun & agentic Linux distribution by DHH. Read more at omarchy.org.

47k3 skills16 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
46.7k
Star history of basecamp/omarchy on GitHub, a chart by star-history.com

Other agents on omarchy.

acceptance-tests

acceptance-tests

Agent

Read this before writing or running the graphical acceptance suite under `test/acceptance.d/`.

@basecamp@basecampInstall Agent
icon-font

icon-font

Agent

Read this before adding a branded glyph to `default/fonts/omarchy/omarchy.ttf`.

@basecamp@basecampInstall Agent
mise-tools

mise-tools

Agent

Read this before adding or changing a mise-managed tool. Default tools belong in `etc/mise/conf.d/omarchy-tools.toml`, which the…

@basecamp@basecampInstall Agent

More agents from other plugins.

api-reference

api-reference

Agent

**⚠️ DEVELOPER REFERENCE ONLY** — This file documents the raw GraphQL API schema for development and maintenance purposes (adding…

unraid2w150
@dinglebear-ai@dinglebear-aiInstall Agent
agent

agent

Agent

The generic template and base persona for PAI. All role-specific agents under [/agents/](../agents/) inherit from this file,…

pai11d115
@nirholas@nirholasInstall Agent

Questions about hooks.

Which coding agents can use hooks?
hooks installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.