diff --git a/AGENTS.md b/AGENTS.md index 6cfad12d..9bb571df 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,7 +52,7 @@ guidance does not drift from the router. # Privileged Commands -- Follow the "Privilege Escalation" section of `default/omarchy-skill/SKILL.md`. It draws the +- Follow the "Privilege Escalation" section of `default/agents/skills/omarchy/SKILL.md`. It draws the `sudo`/`pkexec` line by whether the caller has a terminal to enter a password in, and the repo's own scripts follow it. diff --git a/bin/omarchy-finalize-user b/bin/omarchy-finalize-user index 41d7a9ae..81db68d4 100755 --- a/bin/omarchy-finalize-user +++ b/bin/omarchy-finalize-user @@ -83,10 +83,10 @@ fi # Dev-aware skill symlinks. Cannot live in /etc/skel because OMARCHY_PATH may # point at a dev checkout (omarchy dev link) where the target differs. mkdir -p ~/.agents/skills ~/.claude/skills ~/.codex/skills ~/.pi/agent/skills -ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.agents/skills/omarchy -ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.claude/skills/omarchy -ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.codex/skills/omarchy -ln -sfn "$OMARCHY_PATH/default/omarchy-skill" ~/.pi/agent/skills/omarchy +ln -sfn "$OMARCHY_PATH/default/agents/skills/omarchy" ~/.agents/skills/omarchy +ln -sfn "$OMARCHY_PATH/default/agents/skills/omarchy" ~/.claude/skills/omarchy +ln -sfn "$OMARCHY_PATH/default/agents/skills/omarchy" ~/.codex/skills/omarchy +ln -sfn "$OMARCHY_PATH/default/agents/skills/omarchy" ~/.pi/agent/skills/omarchy mkdir -p ~/Downloads ~/Pictures ~/Videos ~/.config/gtk-3.0 xdg-user-dirs-update --set TEMPLATES "$HOME" diff --git a/bin/omarchy-upgrade-to-quattro b/bin/omarchy-upgrade-to-quattro index 00083d33..97aea8e2 100755 --- a/bin/omarchy-upgrade-to-quattro +++ b/bin/omarchy-upgrade-to-quattro @@ -1877,11 +1877,11 @@ repair_sleep_lock_unit_override install_bash_startup mkdir -p "$HOME/.agents/skills" "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.pi/agent/skills" -if [[ -d $root/default/omarchy-skill ]]; then - ln -sfn "$root/default/omarchy-skill" "$HOME/.agents/skills/omarchy" - ln -sfn "$root/default/omarchy-skill" "$HOME/.claude/skills/omarchy" - ln -sfn "$root/default/omarchy-skill" "$HOME/.codex/skills/omarchy" - ln -sfn "$root/default/omarchy-skill" "$HOME/.pi/agent/skills/omarchy" +if [[ -d $root/default/agents/skills/omarchy ]]; then + ln -sfn "$root/default/agents/skills/omarchy" "$HOME/.agents/skills/omarchy" + ln -sfn "$root/default/agents/skills/omarchy" "$HOME/.claude/skills/omarchy" + ln -sfn "$root/default/agents/skills/omarchy" "$HOME/.codex/skills/omarchy" + ln -sfn "$root/default/agents/skills/omarchy" "$HOME/.pi/agent/skills/omarchy" fi mkdir -p "$HOME/.local/state/omarchy/toggles/hypr" diff --git a/default/omarchy-skill/SKILL.md b/default/agents/skills/omarchy/SKILL.md similarity index 59% rename from default/omarchy-skill/SKILL.md rename to default/agents/skills/omarchy/SKILL.md index 8cb227ae..1b00974a 100644 --- a/default/omarchy-skill/SKILL.md +++ b/default/agents/skills/omarchy/SKILL.md @@ -36,20 +36,30 @@ It is not for contributing to Omarchy source code. **Do NOT use this skill for Omarchy development tasks** (editing the Omarchy source tree, creating migrations, or running `omarchy dev ...` workflows). +## Topic Guides + +Deeper instructions for common areas live next to this file. Read the +matching guide before starting: + +- [`hyprland.md`](hyprland.md) - keybindings, monitors, window rules, and other Hyprland config +- [`plugins.md`](plugins.md) - the Omarchy shell: bar layout, widgets, plugins, idle behavior +- [`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 +- [`contributing.md`](contributing.md) - reporting Omarchy bugs and submitting fixes upstream + ## Critical Safety Rules -When invoking a privileged command directly, use `pkexec` instead of `sudo` so Omarchy can show a graphical authorization prompt with command context. Do not wrap commands that already manage privilege elevation themselves. +For privileged commands, follow the Privilege Escalation rules below: `sudo` when a terminal is available for the password prompt, `pkexec` when it is not. Do not wrap commands that already manage privilege elevation themselves. **For end-user customization tasks, NEVER modify anything in `/usr/share/omarchy/`** - but READING is safe and encouraged. -This directory contains Omarchy's source files managed by git. Any changes will be: -- Lost on next `omarchy update` -- Cause conflicts with upstream -- Break the system's update mechanism +This directory is owned by the omarchy package. Any local changes will be +overwritten on the next `omarchy update`. ``` /usr/share/omarchy/ # READ-ONLY - NEVER EDIT (reading is OK) -├── bin/ # Source scripts (symlinked to PATH) +├── bin/ # Command source (packaged binaries are on PATH) ├── config/ # Default config templates ├── themes/ # Stock themes ├── default/ # System defaults @@ -66,7 +76,7 @@ This directory contains Omarchy's source files managed by git. Any changes will **Always use these safe locations instead:** - `~/.config/` - User configuration (safe to edit) -- `~/.config/omarchy/themes//` - Custom themes (must be real directories) +- `~/.config/omarchy/themes//` - Custom themes - `~/.config/omarchy/hooks/` - Custom automation hooks If the request is to develop Omarchy itself, this skill is out of scope. Follow repository development instructions instead of this skill. @@ -92,7 +102,7 @@ Omarchy is built on: | **Arch Linux** | Base OS | `/etc/`, `~/.config/` | | **Hyprland** | Wayland compositor/WM | `~/.config/hypr/` | | **Omarchy shell** | Status bar + notifications (Quickshell) | `~/.config/omarchy/shell.json` | -| **Launcher** | Quickshell launcher | `~/.config/omarchy/shell.json` | +| **Launcher/menus** | Quickshell menu | `~/.config/omarchy/extensions/omarchy-menu.jsonc` | | **Alacritty/Foot/Kitty/Ghostty** | Terminals | `~/.config//` | | **Omarchy OSD** | On-screen display | Quickshell plugin | @@ -101,7 +111,7 @@ Omarchy is built on: Omarchy ships a single `omarchy` CLI that dispatches to all `omarchy-*` binaries via `omarchy `. Always prefer this form — it is self-documenting and stable. The underlying `omarchy-*` binaries still exist on `PATH` and remain safe to read for source. ```bash -# List every documented command and its summary +# List every documented command and its summary (--all includes hidden commands) omarchy commands # Show the commands inside a group @@ -142,52 +152,9 @@ Run `omarchy --help` for the full list. The most common groups: ## Configuration Locations -### Hyprland (Window Manager) - -Omarchy configures Hyprland in Lua. User files are loaded after Omarchy's -defaults, so overrides go here: - -``` -~/.config/hypr/ -├── hyprland.lua # Main config (loads Omarchy defaults, then user files) -├── bindings.lua # Keybindings -├── monitors.lua # Display configuration -├── input.lua # Keyboard/mouse settings -├── looknfeel.lua # Appearance (gaps, borders, animations) -├── autostart.lua # Startup applications -└── hyprsunset.conf # Night light / blue light filter -``` - -**Key behaviors:** -- Hyprland auto-reloads on config save (no restart needed for most changes) -- Use `hyprctl reload` to force reload -- After ANY Hyprland config change, validate with `hyprctl reload` followed by `hyprctl configerrors` -- If `hyprctl configerrors` reports errors, address them and rerun validation until clean or until a real blocker is identified -- Use `omarchy refresh hyprland` to reset to defaults - -### Omarchy shell (Status Bar + Notifications) - -The bar, notification daemon, settings panel, and assorted overlays all run -inside a single long-running Quickshell process (`omarchy-shell`). - -``` -~/.config/omarchy/shell.json # User overrides: bar, plugins, idle -~/.config/omarchy/plugins// # User-owned shell plugins -$OMARCHY_PATH/config/omarchy/shell.json # Canonical defaults -``` - -The shell hot-reloads `shell.json` on save — no restart needed for layout -changes. `idle.screensaver` and `idle.lock` are seconds since user idle began. - -To customize a built-in bar widget, never edit `$OMARCHY_PATH/shell/plugins/`. -Clone it into the user plugin directory instead: - -```bash -omarchy plugin clone omarchy.workspaces -# Edit ~/.config/omarchy/plugins/.workspaces/; saved changes reload automatically. -``` - -**Commands:** `omarchy restart shell`, `omarchy refresh shell` +Hyprland config lives in `~/.config/hypr/` — see [`hyprland.md`](hyprland.md). +The Omarchy shell (bar, notifications, plugins, idle) is configured in +`~/.config/omarchy/shell.json` — see [`plugins.md`](plugins.md). ### Terminals @@ -212,7 +179,7 @@ omarchy plugin clone omarchy.workspaces ## Safe Customization Patterns -### Pattern 1: Edit User Config Directly +### Edit User Config Directly For simple changes, edit files in `~/.config/`: @@ -227,44 +194,12 @@ cp ~/.config/hypr/bindings.lua ~/.config/hypr/bindings.lua.bak.$(date +%s) # 4. Apply changes # - Hyprland: auto-reloads on save, but MUST validate with `hyprctl reload` and `hyprctl configerrors` -# - Omarchy shell: shell.json hot-reloads; use `omarchy-shell shell rescanPlugins` for plugin/widget code changes -# - Launcher: restart with `omarchy restart shell` -# - Terminals: MUST restart with `omarchy restart terminal` +# - Omarchy shell: shell.json and user plugin code under ~/.config/omarchy/plugins/ hot-reload on save +# - Menus/launcher: ~/.config/omarchy/extensions/omarchy-menu.jsonc hot-reloads on save +# - Terminals: apply with `omarchy restart terminal` (reloads running terminals; foot picks changes up in new windows) ``` -### Pattern 2: Make a new theme - -1. Create a directory under ~/.config/omarchy/themes. -2. See how an existing theme is done via /usr/share/omarchy/themes/catppuccin. -3. Download a matching background (or several) from the internet and put them in ~/.config/omarchy/themes/[name-of-new-theme] -4. When done with the theme, run `omarchy theme set "Name of new theme"` - -### Pattern 3: Use Hooks for Automation - -Hooks live in `~/.config/omarchy/hooks/.d/` — one directory per event, -holding any number of independent scripts. Install with -`omarchy hook install