---
name: omarchy-on-a-mac
description: Make Omarchy (Arch Linux + Hyprland) on an old MacBook feel like macOS. Cmd shortcuts via Toshy, Magnet-style window snapping on Ctrl+Option+arrows, Cmd+Tab between workspaces, three-finger swipe between workspaces, Ctrl+Cmd+Space emoji picker, Cmd+C copying in Zed's terminal, momentum scrolling on the Magic Mouse, a touchpad that stays off while typing, stable Bluetooth headphones on video calls, no notification popups, and Thunderbird following the Omarchy theme. Has a separate section for Swiss and German Mac keyboards (Left Option typing @, #, [, |), and one for US keyboards. Use when someone installed Omarchy on a Mac and wants macOS muscle memory back, or asks about any of these tweaks.
---

# Omarchy on a Mac, with macOS muscle memory

Omarchy is built around the Super key and tiling. Someone coming from macOS has
years of Cmd shortcuts, Magnet or Rectangle window snapping and Option
characters in their fingers. This skill brings most of that back without
fighting Omarchy: every change lives in the user's own config, survives
`omarchy update`, and can be undone file by file.

Tested on an Intel MacBook (T2) with Omarchy 4.5, Hyprland 0.56 (Lua config),
Toshy, Thunderbird 158, Zed and a Magic Mouse 2. Hardware support for the Mac itself (keyboard,
Wi-Fi, audio drivers) is out of scope.

## For the agent applying this

- Ask which parts the user wants. Everything in **Part 1** works on every
  keyboard. **Part 2** is only for Swiss and German (and similar European) Mac
  layouts. **Part 3** is only for US keyboards. Never apply Part 2 and Part 3
  together.
- Never edit anything in `/usr/share/omarchy/`. It belongs to the Omarchy
  package and is overwritten on update. Read it freely to see how Omarchy
  does things.
- Back up every file before changing it (`cp file file.bak.$(date +%s)`).
- After every Hyprland change run `hyprctl reload` and then
  `hyprctl configerrors`, and fix anything it prints.
- The files linked below are the working versions. Download them next to this
  SKILL.md (`assets/<file>`), read them, then copy them into place.
- Find out the keyboard layout first: `hyprctl getoption input:kb_layout` and
  `input:kb_variant` (for example `ch` + `de_mac`, `de` + `mac`, `us`).

## The key translation everything builds on

[Toshy](https://github.com/RedBearAK/toshy) remaps keys per app, like macOS
does. On an Apple keyboard it sets things up as follows:

| Physical key | Reaches apps as | Reaches Hyprland as |
|---|---|---|
| Cmd | Ctrl (Cmd+C copies, Cmd+T opens a tab) | Ctrl |
| Ctrl | Super, in GUI apps; plain Ctrl in terminals | Super |
| Option | Alt | Alt |

So every Omarchy `SUPER` shortcut now sits on the physical **Ctrl** key, and
Magnet's Ctrl+Option becomes `SUPER + ALT` in Hyprland. Keep this table in mind
for every binding below.

## Part 1: For every keyboard

### 1.1 Toshy: Cmd shortcuts like on a Mac

Install Toshy (on Omarchy it needs the Arch override):

```sh
git clone https://github.com/RedBearAK/toshy ~/src/toshy
cd ~/src/toshy && ./setup_toshy.py install --override-distro arch
```

Then paste [toshy-omarchy-keymaps.py](assets/toshy-omarchy-keymaps.py) between
the `user_apps` slice marks in `~/.config/toshy/toshy_config.py` (code outside
the marks is lost on Toshy updates) and restart it with
`systemctl --user restart toshy-config.service`. It adds:

| Mac shortcut | Does |
|---|---|
| Cmd+Space | Omarchy launcher |
| Cmd+Shift+3 / 4 | Screenshot |
| Cmd+Shift+5 | Capture menu (screenshot, recording) |
| Cmd+H, Cmd+M | Minimize |
| Cmd+Tab, Cmd+Shift+Tab | Switch workspaces, most recently used first (1.3) |
| Ctrl+Cmd+Space | Emoji picker (Omarchy's, normally Super+Ctrl+E) |
| Ctrl+1 to 0 | Workspace 1 to 10, also inside terminals |
| Cmd+C, Cmd+V in Zed | Copy and paste, also in Zed's terminal (1.10) |

Lock the screen with Ctrl+Cmd+Q, as on a Mac. Omarchy puts the calculator
there, so replace it in `~/.config/hypr/bindings.lua`:

```lua
hl.unbind("SUPER + CTRL + Q")
o.bind("SUPER + CTRL + Q", "Lock system", "omarchy-system-lock")
```

### 1.2 Magnet window shortcuts

[magnet.lua](assets/magnet.lua) goes to `~/.config/hypr/magnet.lua`, loaded with
`require("hypr.magnet")` at the end of `~/.config/hypr/bindings.lua`.

| Ctrl+Option + | Window goes to |
|---|---|
| ← → ↑ ↓ | Left, right, top, bottom half |
| Return | Maximize |
| C | Center |
| U, I, J, K | Top left, top right, bottom left, bottom right quarter |
| D, F, G | Left, center, right third |
| E, T | Left, right two thirds |
| Backspace | Back into the tiling |
| + Cmd, ← → | Previous, next display |

Magnet arranges free-floating windows, while Omarchy tiles them. The module
mixes both, with these rules:

- A window alone on its workspace floats and snaps to the half you press,
  like Magnet.
- With other windows there, a half shortcut keeps it tiled and moves it to
  that side, swapping with its neighbour, and resets the split to an even
  50/50. A top/bottom split flips to side by side when you press ← or →, and
  the other way round.
- Windows floated by these shortcuts carry the Hyprland tag `magnet`. When a
  new app opens or is moved next to them, they rejoin the tiling, so the new
  app fills the free half instead of opening full screen behind them.
- Windows you floated yourself have no tag. The shortcuts just snap them.
- Thirds, quarters, center and maximize always float and snap.

The module displaces some Omarchy defaults on `SUPER + ALT` (move into group,
full width, ungroup, Tmux). Grouping stays on Super+G, fullscreen on Super+F,
and Tmux moves to `SUPER + SHIFT + ALT + RETURN`.

### 1.3 Cmd+Tab between workspaces

[workspace-switcher.lua](assets/workspace-switcher.lua) goes to
`~/.config/hypr/workspace-switcher.lua`, loaded with
`require("hypr.workspace-switcher")`. Hold Cmd and press Tab: the first Tab
goes to the previous workspace, each further Tab steps right, Shift+Tab steps
left, and releasing Cmd commits. It needs the Cmd+Tab lines from 1.1, which
hold the modifiers down while Cmd is held.

### 1.4 Three-finger swipe between workspaces

macOS Spaces are Omarchy's workspaces. In `~/.config/hypr/input.lua`
uncomment the line Omarchy already ships:

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

### 1.5 Touchpad off while typing (optional)

libinput blocks the touchpad for only half a second after a key, so resting
palms still move the cursor on a big MacBook touchpad.
[typing-touchpad-lock.py](assets/typing-touchpad-lock.py) turns it off after
three typed characters and on again only on a physical click or Esc. Install it
as `~/.local/bin/typing-touchpad-lock.py` with
[typing-touchpad-lock.service](assets/typing-touchpad-lock.service) in
`~/.config/systemd/user/`, then
`systemctl --user enable --now typing-touchpad-lock`. It reuses Toshy's Python,
which has `python-evdev`. Side effect: the three-finger swipe also waits for a
click after typing.

### 1.6 Tiling only (optional)

Omarchy lets each workspace switch between tiling, scrolling and floating
layouts. For people who want plain tiling everywhere,
[tiling-only.lua](assets/tiling-only.lua) (loaded from `hyprland.lua` with
`require("hypr.tiling-only")`) plus
[tiling-only-cleanup.sh](assets/tiling-only-cleanup.sh) in `~/.local/bin/`
(executable) pin every workspace to tiling and unbind the layout keys.

### 1.7 Bluetooth headphones on video calls

The symptom: audio from Bluetooth headphones drops out, especially when a
Google Meet or Zoom tab is open. The logs (`journalctl --user -u wireplumber`)
show `Failure in Bluetooth audio transport`. The cause: as soon as an app uses
the headphones' microphone, they switch from the high-quality music profile to
the low-quality headset profile. The Mac's Broadcom Bluetooth chip often drops
the link during that switch.

The fix is to talk into the MacBook's microphone and keep the headphones on
the music profile:

```sh
wpctl status                       # note the id of the internal microphone
wpctl set-default <id>             # make it the default input
wpctl settings --save bluetooth.autoswitch-to-headset-profile false
```

In Meet, check Settings → Audio once: it can remember the headphone mic and
ignore the default. Disconnecting the headphones from the phone helps as well.

### 1.8 No notification popups

Omarchy's Do Not Disturb is persistent across reboots:

```sh
omarchy-shell notifications setDnd on
omarchy-shell -q omarchy.indicators refresh
```

By Omarchy's design, its own short confirmation messages and urgent system
alerts (low battery) still show. A crossed-out bell in the bar shows silence
is on, and clicking it turns notifications back on.

### 1.9 Thunderbird in the Omarchy theme

Omarchy themes a list of apps from the theme's `colors.toml` through templates.
Thunderbird is not on that list, but the same mechanism works for it:

1. [thunderbird.css.tpl](assets/thunderbird.css.tpl) goes to
   `~/.config/omarchy/themed/thunderbird.css.tpl`. Omarchy renders it on every
   theme change. It only overrides Thunderbird's own colour variables, so
   layout and states keep working and email contents stay untouched.
2. [thunderbird-theme-hook.sh](assets/thunderbird-theme-hook.sh) is installed
   with `omarchy hook install theme-set thunderbird-theme-hook.sh`. It copies
   the rendered CSS into every Thunderbird profile, imports it from
   `chrome/userChrome.css` (keeping what's already there) and sets
   `toolkit.legacyUserProfileCustomizations.stylesheets` in `user.js`.
3. Run `omarchy theme refresh` once, then restart Thunderbird. It reads the
   styling only at startup, also after later theme changes.

### 1.10 Cmd+C in Zed's terminal

Zed is a GUI app, so Toshy sends Cmd+C as Ctrl+C. Physical Ctrl+C arrives as
Ctrl+C too (Super+C, which Omarchy's universal copy turns into Ctrl+C). In the
editor that copies, but in Zed's built-in terminal Ctrl+C stops the running
command, and Zed can't tell the two keys apart.

The "User Zed" keymap at the end of
[toshy-omarchy-keymaps.py](assets/toshy-omarchy-keymaps.py) (part of 1.1) sends
Cmd+C and Cmd+V in Zed as Ctrl+Insert and Shift+Insert, the other standard
Linux copy and paste keys. [zed-keymap.json](assets/zed-keymap.json) goes to
`~/.config/zed/keymap.json` (merge it if the file exists) and binds those keys
to copy and paste in both the editor and the terminal. Cmd+C/V now copy and
paste everywhere in Zed, and physical Ctrl+C still stops a command, as on a
Mac.

### 1.11 Momentum scrolling on the Magic Mouse

On macOS a flick on the Magic Mouse keeps the page gliding after the finger
lifts. On Linux the `hid_magicmouse` driver turns the finger into scroll-wheel
steps, so apps never add momentum and it feels like an old wheel mouse.

[magicmouse-glide.py](assets/magicmouse-glide.py) fixes this from user space.
It grabs the mouse and passes pointer motion and clicks through a virtual
mouse ("Magic Mouse Glide"). It drops the driver's wheel events and replays a
sliding finger as a two-finger swipe on a virtual touchpad ("Magic Mouse Glide
Surface"), lifting both fingers when the real one lifts. libinput then reports
real touchpad scrolling, and apps add their own glide, the same as for the
built-in trackpad. Chromium, Firefox and GTK apps do that; apps without
momentum still scroll smoothly but stop when the finger lifts.

```sh
python3 -m venv ~/.local/share/magicmouse-glide/venv
~/.local/share/magicmouse-glide/venv/bin/pip install evdev
install -m 755 magicmouse-glide.py ~/.local/bin/magicmouse-glide
cp magicmouse-glide.service ~/.config/systemd/user/
systemctl --user enable --now magicmouse-glide
```

The user must be in the `input` group (for `/dev/uinput` and the mouse); check
with `groups`. Then add to `~/.config/hypr/input.lua`:

```lua
-- Copy any pointer speed set for "magic-mouse-2" to the virtual mouse.
hl.device({ name = "magic-mouse-glide", sensitivity = -0.76 })
-- The virtual touchpad only scrolls. With tapping on, a short swipe counts as
-- a two-finger tap and right-clicks.
hl.device({ name = "magic-mouse-glide-surface", tap_to_click = false, tap_and_drag = false })
```

Notes:

- Scroll direction follows the touchpad `natural_scroll` setting (content
  follows the finger, like macOS), not the mouse setting.
- Speed: set `Environment=GLIDE_GAIN=1.5` (or lower than 1) in the service.
- It waits for the mouse when Bluetooth disconnects. `systemctl --user stop
  magicmouse-glide` gives the plain driver behaviour back at once.
- The virtual touchpad's name avoids the words "touchpad" and "trackpad", so
  `omarchy-hw-touchpad` and the typing lock in 1.5 keep targeting the built-in
  one.

## Part 2: Swiss and German Mac keyboards

On the Mac layouts for Switzerland (`ch` / `de_mac`) and Germany (`de` / `mac`)
Option types characters: on Swiss Option+G is @, Option+3 #, Option+5 [,
Option+7 |; on German Option+L is @. Linux treats only the **right** Option key
that way. Left Option sends a plain Alt, so apps see an Alt shortcut and run it
or do nothing.

Making left Option a character key system-wide (`lv3:lalt_switch`) would break
every `SUPER + ALT` binding, including all Magnet shortcuts. Instead, a Toshy
keymap sends left Option+key as right Option+key, for the 48 typing keys only:
[toshy-left-option-characters.py](assets/toshy-left-option-characters.py).
Paste it into the `user_apps` slice next to the Part 1 keymaps and restart
Toshy.

Ctrl+Option (Magnet), Cmd+Option, Option+Tab and Option+arrows keep working,
because they are different key combinations. The trade-off, matching macOS:
apps lose their Alt+letter shortcuts, and in a terminal Option+B / Option+F
type characters instead of jumping by word.

To check which keys a layout gives characters, compile it and look at level 3:

```sh
xkbcli compile-keymap --layout ch --variant de_mac | grep -A3 'key <AC05>'
```

Other European Mac layouts work the same way (French, Nordic, ...), as long as
their Option level is on `ralt_switch`. Check with
`grep -A80 'xkb_symbols "mac"' /usr/share/X11/xkb/symbols/<country>`.

## Part 3: US keyboards

On the plain `us` layout, Option has no characters on Linux, so Option+key is
always an Alt shortcut. Nothing is broken, and Part 2 is not needed.

To type macOS Option characters (©, ™, –, …) the way macOS does, Toshy has a
built-in feature: in the Toshy tray menu or `toshy-gui`, set "Option-key
special characters" to **US**. It also brings macOS dead keys (Option+E, then
E, gives é). Leave it **Disabled** on Swiss or German layouts, which use their
own characters.

## Pitfalls, for agents writing Hyprland Lua

Things learned while building this, on Hyprland 0.56 with the Lua config:

- `hyprctl dispatch` takes a Lua expression, not the old dispatcher syntax:
  `hyprctl dispatch 'hl.dsp.window.float({ action = "off", window = "address:0x..." })'`.
- Window objects have `at`, `size`, `floating`, `tags`, `workspace` and
  `monitor`, and are userdata: `pairs()` on them fails, so probe fields by name.
- `hl.get_workspace_windows()` takes the workspace id as a **string**.
- In a `window.destroy` handler the window has no address any more: wrap
  access in `pcall`.
- Geometry changes after a dispatch only show up a moment later. Re-read
  positions in `hl.timer(fn, { type = "oneshot", timeout = 20 })`, and wrap
  the callback in `pcall`.
- Dwindle has no built-in "move left and flip the split": combine
  `hl.dsp.layout("togglesplit")` with `hl.dsp.window.swap`.
- A tiled window never takes half the screen while it's alone. Half-screen
  for a lone window means floating it, and floating windows then need care to
  rejoin the tiling (the `magnet` tag in 1.2).
- On fractional scaling (a MacBook at 1.6x), compare window positions with a
  pixel or two of tolerance, never exactly.
- Omarchy's Lua config re-runs on every reload, so state kept in Lua tables is
  lost. Derive what you need from window geometry and tags instead.
