@benbxyz
All notes

How I set up Omarchy Linux


Omarchy is an agent-first operating system created by DHH that is built on Arch Linux and Hyprland. Being agent-first means that a lot of its desktop is plain config files that are readble and editable, so you can just ask your AI agent of choice to change whatever you want to make the OS fit your style and the way you like to work.

I have been using Omarchy now for a few months and its definitly the way forward, having the tiling window manager is a gamechanger, even though it takes a bit of getting used to at first. I’m reluctant to boot the Mac at all now, and only do it to fetch something off the old machine.

Documented here are the customisations I make to get Omarchy setup for the way I like it. I keep them in a single checklist, setup.md, alongside a small Lua module for window borders. Rather than work through it by hand, I can just hand the file to Claude (“set up this machine using ~/Work/omarchy/setup.md”) and it goes through each section in order, checking each step before moving on and asking me to run anything that needs a password or a browser login.

Below is what’s in it, as of Hyprland 0.56.2 and its Lua config.

Clearing out the preinstalls

First, everything I don’t use goes: the bundled web apps, the TUI wrappers and apps like Obsidian, LibreOffice, OBS and Kdenlive. Omarchy has a single command for it, which also turns off their keybindings:

omarchy remove preinstalls

Apps

Then the apps I do use. Claude as the default coding agent, Zed as my editor and Ghostty as my terminal:

omarchy default agent claude
omarchy install editor zed
omarchy default editor zed
omarchy install terminal ghostty

And a few services: Tailscale, 1Password (which also installs its Chromium extension) and Spotify.

omarchy install service tailscale
omarchy install service 1password
omarchy install service spotify

Keybindings and gestures

I use a Logitech MX Keys and an MX Anywhere 3S, so most of my bindings put their extra keys and buttons to work. They go in ~/.config/hypr/bindings.lua:

-- ChatGPT, opening a new chat.
o.bind("SUPER + SHIFT + A", "ChatGPT (new chat)", "uwsm-app -- chatgpt codex://threads/new")

-- MX Anywhere 3S side buttons switch workspaces.
o.bind("mouse:275", "Previous workspace", hl.dsp.focus({ workspace = "e-1" }))
o.bind("mouse:276", "Next workspace", hl.dsp.focus({ workspace = "e+1" }))

-- MX Keys function-row keys.
o.bind("SUPER + SHIFT + S", "Screenshot", "omarchy-capture-screenshot")
o.bind("SUPER + PERIOD", "Emojis", "omarchy-shell shell toggle omarchy.emojis")

-- MX Anywhere 3S: float toggle and carry the window to the next/previous workspace.
o.bind("SUPER + mouse:274", "Toggle window floating/tiling", hl.dsp.window.float({ action = "toggle" }))
o.bind("SUPER + SHIFT + mouse:275", "Move window to previous workspace", hl.dsp.window.move({ workspace = "r-1" }))
o.bind("SUPER + SHIFT + mouse:276", "Move window to next workspace", hl.dsp.window.move({ workspace = "r+1" }))
Shortcut What it does
SUPER + SHIFT + A Opens the ChatGPT desktop app on a new chat
Mouse back / forward Previous / next workspace that has windows
SUPER + SHIFT + mouse back / fwd Moves the focused window to the previous / next workspace
SUPER + middle click Switches the focused window between floating and tiled
MX Keys screenshot key Takes a screenshot
MX Keys emoji key Opens the emoji picker

The mouse side buttons switching workspaces does mean losing Back and Forward in the browser, but I use them far more for this. If a button or key does nothing on your hardware, wev will tell you the code it actually sends.

On the trackpad, a three-finger horizontal swipe switches workspace too. It’s one line in ~/.config/hypr/input.lua:

hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })

Click to focus

Omarchy focuses whichever window is under the mouse, and I’d rather it only changed when I click or use the keyboard. Setting follow_mouse to 2 does that, while still letting me scroll the window under the cursor without focusing it:

hl.config({
  input = {
    follow_mouse = 2,
  },
})

0 also stops hover from moving focus, but it ties the mouse to the focused window until you click, so scrolling another window doesn’t work.

Look and feel

Rounded corners

Omarchy’s windows have square corners. I like them just slightly rounded:

hl.config({
  decoration = {
    rounding = 6,
  },
})

Borders only when I need them

This is the one I spent longest on. By default every window has a 2px border, coloured on the focused one and grey on the rest. I wanted no borders at all most of the time, but still a way to see which window has focus when I’m moving around with the keyboard. So the focused window’s border only shows:

  • while SUPER is held, so it’s there during SUPER + arrows
  • from ALT + TAB until I let go of ALT

Clicking, swiping or the mouse buttons don’t show anything. I tried an always-on thin border on the focused window and dimming the unfocused ones, and didn’t like either. I also built a version that flashed the border on every focus change, which turned out far too distracting.

It lives in its own module, focus-border.lua, loaded from ~/.config/hypr/looknfeel.lua:

require("hypr.focus-border").setup()

A couple of things I learnt building it:

  • Change the colour, not the width. Borders are always 1px, and the module just switches the focused one between transparent and the theme’s colour. Changing the width instead resizes every window each time it shows.
  • Don’t trust release binds. Hyprland skips a release bind on ALT or SUPER if another key was pressed while it was held, which is exactly what happens with ALT + TAB, so the border got stuck on. Instead, while the border is showing, a 50ms timer checks hl.is_key_down() and hides it once the keys are let go.

Floating windows get one extra touch: a faint white border at 10% opacity, focused or not, so they stand out from whatever’s behind them.

Shadows on floating windows

Omarchy turns shadows off. I turn them back on, but only for floating windows, so none show in the gaps between tiled ones:

hl.config({
  decoration = {
    shadow = {
      enabled = true,
      range = 30,
      render_power = 3,
      offset = { 0, 6 },
      color = "rgba(00000040)",
    },
  },
})
o.window({ float = false }, { no_shadow = true })

The rule follows the window’s float state, so a window picks up its shadow as soon as it’s floated and loses it when it’s tiled again.

That’s everything. Because it’s all in one checklist, the next fresh install should end up exactly like this one.

Software engineer for over 20 years, now mostly managing a team of AI agents. Into 80s synths, and a good hike in the hills when the screen's off.

All notes