agentleFS
tuladhartuladhar/my-claude-skills-as-devops-engineer/skills/omarchy-menu-order/SKILL.md

omarchy-menu-order

Skill11 starsChanged 13 days agoMITView on GitHub

Reorder items in an Omarchy menu (the System menu by default), or put a menu back to its default order. Use for requests like "move Lock to the top", "put Logout under Reboot", "move lock behind screensaver", "reset the system menu order", or /omarchy-menu-order. Works live from the machine's own Omarchy menu, so it stays correct across Omarchy updates.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Preflight: If /usr/share/omarchy (or $OMARCHY_PATH) doesn't exist, this isn't an Omarchy machine: say so and stop.

    line 34
  2. Very specific:

    Look first: Run show <menu>. With no menu named, use system.

    line 35
  3. Distinctive:

    Read directions the way the menu looks on screen: "top" is first.

    line 37
  4. Distinctive:

    If the request could reasonably mean two different orders, pick the most natural reading, and say in one line which one you picked.

    line 38
  5. Distinctive:

    If the helper reports an error, show the message in plain words and stop.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reorder an Omarchy menu

The user wants to change the order of items in an Omarchy menu (Super + Esc opens the System menu), or undo that. Do the work yourself with the helper below. Don't hand the user commands to run or files to edit.

How it works (know this, don't lecture it)

  • Omarchy builds its menu from the stock file /usr/share/omarchy/default/omarchy/omarchy-menu.jsonc (owned by the omarchy package, overwritten on every update) merged with the user's file ~/.config/omarchy/extensions/omarchy-menu.jsonc. The menu reloads the user's file on save, so no restart is needed.
  • Overriding a stock item by id keeps its original position, so items can't be moved that way. The helper hides the stock items of one menu ("when":"false") and adds copies back in the wanted order. It copies them from the live stock file on this machine, so icons, commands and conditions are always the current ones.
  • Everything the helper writes sits between // >>> omarchy-menu-order: <menu> and // <<< omarchy-menu-order: <menu> marker comments. It never touches anything else in the file. Before every write, it validates the result with the same parsing rules Omarchy uses and keeps a backup at ~/.config/omarchy/extensions/omarchy-menu.jsonc.bak-menu-order.
  • While any menu is reordered, the helper keeps a post-update hook at ~/.config/omarchy/hooks/post-update.d/omarchy-menu-order. After each omarchy update, the hook rebuilds the reordered menus from the new stock file. When nothing is reordered any more, the helper removes the hook again.

The helper

scripts/menu_order.py next to this file (the base directory is shown when the skill loads). Run it with python3.

CommandWhat it does
show [MENU]Read-only: stock order, current order, status, conflicts. MENU defaults to system.
set MENU ITEM...Write a new order. ITEMs are the short names from show (e.g. lock). Items you leave out keep their stock order after the ones you list.
reset MENU / reset --allRemove the managed block, back to the default order.
sync [--all]Rebuild from the live stock menu (the update hook runs this).
checkExit 1 if a reordered menu is out of date with the stock menu.
listWhich menus are reordered, and whether the hook is installed.
list-menusEvery menu id and its items, e.g. system, root (top level), trigger.

Steps

  1. Preflight. If /usr/share/omarchy (or $OMARCHY_PATH) doesn't exist, this isn't an Omarchy machine: say so and stop. If python3 is missing, say it's needed and suggest omarchy pkg add python. Don't install it yourself.
  2. Look first. Run show <menu>. With no menu named, use system. If the user names a menu you can't place, run list-menus and pick the matching one, or ask.
  3. Work out the full order from what the user said and the current order from show.
    • Read directions the way the menu looks on screen: "top" is first. "Behind", "after" and "below" mean the next row down, and "before" and "above" mean the next row up.
    • If the request could reasonably mean two different orders, pick the most natural reading, and say in one line which one you picked. It's one command to change.
    • "Reset", "default", "undo", "turn it off" or "put it back" mean reset. No request at all, or "status", means: show the current order and stop.
  4. Conflicts. If show lists a CONFLICT (the user already overrides some of this menu's stock items by hand), set will refuse. Show the user the conflicting lines from their file, and explain that they'd fight with the new order. Remove them only after the user says yes. They may also need to remove hand-made copies (listed under "Your own items") that would otherwise show up twice. Then run set.
  5. Apply. Run set <menu> <items in the new order>.
  6. Report briefly. Show the new order as a short numbered list. Mention, once, that the menu has already updated (Super + Esc to see it) and that /omarchy-menu-order reset puts it back. Also mention the update hook the first time it gets installed.

Safety: stop and say so instead of doing it

This skill only reorders existing menu items. If a request needs any of the following, explain why in a sentence or two, and don't do it:

  • Editing anything under /usr/share/omarchy/, or using sudo/pkexec. It's never needed for this.
  • Changing what an item does: its command, its when condition, or adding a new item with a command. Those run as the user from a menu, so they're a separate, deliberate change, not part of reordering.
  • Moving a submenu or a runtime-generated item (show marks them "can't move"). A copy would lose its children or its rows.
  • Writing the menu file by hand when the helper refuses. Fix what it complains about instead, with the user's agreement.
  • Running omarchy refresh or restoring the backup over newer changes without asking.
  • Triggering a menu item to "test" it (Lock, Logout, Reboot and Shutdown act immediately). Use show to verify instead.

If the helper reports an error, show the message in plain words and stop. Don't work around it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.