Skip to content

Commit cb47663

Browse files
committed
feat(omarchy): configure window switcher, chrome, and keybindings
- Restrict Hyper+W window switcher to the current workspace - Add Slack keybindings and free Super+K/P for app shortcuts - Configure Google Chrome with Wayland flags and personal profile setup Generated-by: aiautocommit
1 parent 90109f6 commit cb47663

7 files changed

Lines changed: 76 additions & 14 deletions

File tree

‎omarchy/.config/chrome-flags.conf‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--ozone-platform=wayland
2+
--ozone-platform-hint=wayland
3+
--enable-features=TouchpadOverscrollHistoryNavigation
4+
--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url
5+
# Profile selection: do not set --profile-directory here.
6+
# The AUR google-chrome wrapper expands flags without shell quoting, so
7+
# "Profile 1" (display name: Personal) cannot be expressed safely.
8+
# Default profile is Personal via ~/.local/bin/chrome-personal and the
9+
# user google-chrome.desktop override (see omarchy Justfile / README).

‎omarchy/.config/hypr/bindings-switcher.conf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Fuzzy switchers (Walker dmenu over hyprctl clients).
22
# Scripts: ~/.config/hypr/scripts/switch-{window,app}.sh
33
#
4-
# Hyper+W → all open windows
4+
# Hyper+W → open windows on the current workspace
55
# Cmd+Tab → running applications (macOS-style; one entry per app class)
66
# Super+Space stays the stock app launcher (installable desktop apps).
77
#

‎omarchy/.config/hypr/bindings-unbind.conf‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,12 @@ unbind = SUPER ALT, DOWN
4040
# Super+Alt+S → move window to scratchpad. Unused; free Super+S for apps / future save.
4141
unbind = SUPER, S
4242
unbind = SUPER ALT, S
43+
44+
# --- Pseudo window (dwindle-only) ---
45+
# Stock (tiling-v2): Super+P → pseudo. No-op on scrolling layout; free Super+P for apps.
46+
unbind = SUPER, P
47+
48+
# --- Keybindings menu ---
49+
# Stock (utilities.conf): Super+K → omarchy-menu-keybindings.
50+
# Free Super+K for apps (e.g. Slack jump, Cursor chords). Use Walker/omarchy menu instead.
51+
unbind = SUPER, K

‎omarchy/.config/hypr/scripts/switch-window.sh‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
#!/usr/bin/env bash
2-
# Fuzzy-switch among all open Hyprland windows (Walker dmenu).
2+
# Fuzzy-switch among open windows on the *current* workspace (Walker dmenu).
33
# Bound to Hyper+W (see bindings-switcher.conf).
44
#
5-
# Each mapped, non-hidden client is listed as:
6-
# [workspace] class — title
7-
# Selecting focuses that window (and its workspace).
5+
# Each mapped, non-hidden client on the active workspace is listed as:
6+
# class — title
7+
# Selecting focuses that window.
88

99
set -euo pipefail
1010

1111
clients_json=$(hyprctl clients -j 2>/dev/null) || exit 0
1212
[[ -n "$clients_json" && "$clients_json" != "[]" ]] || exit 0
1313

14-
# Sort by focus history (0 = most recently focused). Skip unmapped/hidden.
14+
ws_id=$(hyprctl activeworkspace -j 2>/dev/null | jq -r '.id // empty')
15+
[[ -n "$ws_id" ]] || exit 0
16+
17+
# Sort by focus history (0 = most recently focused). Current workspace only.
1518
# Address is field 1 (tab-separated) so titles may contain anything.
16-
mapfile -t lines < <(jq -r '
17-
[.[] | select(.mapped == true and .hidden == false)]
19+
mapfile -t lines < <(jq -r --argjson ws "$ws_id" '
20+
[.[] | select(.mapped == true and .hidden == false and .workspace.id == $ws)]
1821
| sort_by(.focusHistoryID)
1922
| .[]
2023
| (.title // "") as $t
2124
| (.class // "?") as $c
22-
| (.workspace.name // "?") as $w
23-
| "\(.address)\t[\($w)] \($c) — \($t | gsub("[\t\n]"; " "))"
25+
| "\(.address)\t\($c) — \($t | gsub("[\t\n]"; " "))"
2426
' <<<"$clients_json")
2527

2628
((${#lines[@]} > 0)) || exit 0

‎omarchy/.config/keyd/app.conf‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,24 @@ cmd.enter = C-enter
120120
cmd.up = C-up
121121
cmd.down = C-down
122122

123+
# --- Slack desktop (class: slack) ---
124+
# Mac Slack → Linux Ctrl chords. Super+K is unbound in Hyprland (bindings-unbind).
125+
# Cmd+K jump-to / quick switcher; Cmd+1..9 workspace/sidebar shortcuts.
126+
[slack]
127+
cmd.k = C-k
128+
cmd.1 = C-1
129+
cmd.2 = C-2
130+
cmd.3 = C-3
131+
cmd.4 = C-4
132+
cmd.5 = C-5
133+
cmd.6 = C-6
134+
cmd.7 = C-7
135+
cmd.8 = C-8
136+
cmd.9 = C-9
137+
123138
# --- Cursor (class: cursor) ---
124139
# Match macOS: Cmd+K / Cmd+P → Ctrl+K / Ctrl+P (chord prefix / Quick Open).
125-
# While focused, Super+K (keybindings menu) and Super+P (pseudo) do not fire.
140+
# Super+K is unbound in Hyprland; Super+P unbound (was dwindle pseudo).
126141
[cursor]
127142
cmd.k = C-k
128143
cmd.p = C-p

‎omarchy/Justfile‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ sync:
88
rsync -a --exclude '/Justfile' --exclude '/AGENTS.md' --exclude '/README.md' --exclude '/scripts/' --exclude '/etc/' {{ root }}/ ~/
99
sudo rsync -a --mkpath {{ root }}/etc/keyd/ /etc/keyd/
1010
chmod +x ~/.config/hypr/scripts/* 2>/dev/null || true
11+
chmod +x ~/.local/bin/chrome-personal 2>/dev/null || true
12+
# Prefer Personal Chrome profile for app launcher / omarchy-launch-browser
13+
update-desktop-database ~/.local/share/applications 2>/dev/null || true
1114
# Shared .config/nvim omits theme.lua (host symlink). Prefer Omarchy 4 state path, else 3.x.
1215
theme_neovim="$HOME/.local/state/omarchy/current/theme/neovim.lua"; [[ -e $theme_neovim ]] || theme_neovim="$HOME/.config/omarchy/current/theme/neovim.lua"; mkdir -p ~/.config/nvim/lua/plugins; [[ -e $theme_neovim ]] && ln -snf "$theme_neovim" ~/.config/nvim/lua/plugins/theme.lua
1316
# Omarchy XDG conf overrides ~/.tmux.conf and breaks TPM plugin path/discovery
@@ -54,7 +57,8 @@ install-pkgs:
5457
# yazi + plugins (same as brew.sh: ya pkg add yazi-rs/plugins:git)
5558
export PATH="${HOME}/.local/bin:${PATH}"; mise install yazi; mise exec -- ya pkg add yazi-rs/plugins:git
5659
# bc: git-fuzzy layout math (preview %); without it fzf gets "invalid preview window option: %"
57-
sudo pacman -S --needed --noconfirm zsh tmux gnupg entr tailscale bc
60+
# bind: dig / host / nslookup (package provides bind-tools / dnsutils)
61+
sudo pacman -S --needed --noconfirm zsh tmux gnupg entr tailscale bc bind
5862
# first login is interactive: sudo tailscale up --accept-routes
5963
sudo systemctl enable --now tailscaled.service
6064
omarchy pkg aur add todoist-appimage slack-desktop
@@ -69,6 +73,8 @@ install-pkgs:
6973
input_server="$HOME/.local/lib/vicinae/usr/libexec/vicinae/vicinae-input-server"; [[ -x "$input_server" ]] && sudo setcap cap_dac_override=ep "$input_server"
7074
omarchy install browser chrome
7175
omarchy default browser chrome
76+
# Stock Omarchy base ships Chromium; drop it — Chrome is the only browser here
77+
omarchy pkg drop chromium
7278
# Webapps: focus existing Chrome app window or launch. Superhuman uses one profile per account
7379
# (Default / Profile 1). Window pattern matches Chrome class (...__-Default / ...__-Profile_1).
7480
# Prefer duckduckgo icons — google s2/favicons often fails (t2.gstatic.com blocked/unreachable)

‎omarchy/README.md‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ omarchy/
4949
├── .cursor/argv.json # → ~/.cursor/argv.json (password-store for Hyprland)
5050
├── .linux # → ~/.linux (zsh: EDITOR=nvim, pbcopy/open shims; not .extra)
5151
├── .config/keyd/app.conf # → ~/.config/keyd/app.conf
52+
├── .config/chrome-flags.conf # → ~/.config/chrome-flags.conf (Wayland; profile via launcher)
5253
├── .config/ghostty/config.local # → ~/.config/ghostty/config.local (tmux path, etc.)
54+
├── .local/bin/chrome-personal # Chrome → Personal profile (directory "Profile 1")
55+
├── .local/share/applications/
56+
│ └── google-chrome.desktop # overrides stock so omarchy-launch-browser uses chrome-personal
5357
├── .tmux.conf.local # → ~/.tmux.conf.local (zsh + PATH; overrides Homebrew)
5458
└── .config/hypr/ # → ~/.config/hypr/ (sourced from hyprland.conf)
5559
├── bindings-hyper.conf
@@ -127,7 +131,7 @@ compose = layer(alt) # compose/menu → Alt if present
127131
- The Windows logo key is **Option/Alt** after remap.
128132
- **1Password Quick Access (macOS-style):** **Cmd+Shift+Space** = Super+Shift+Space → `1password --quick-access` (`bindings-1password.conf`). Stock Omarchy used that chord for **toggle Waybar**; that bind is unbound here.
129133
- **Caps Lock** → Hyper (`Ctrl+Alt+Shift+Super`) for window focus / workspace numbers (see `bindings-hyper.conf`, `bindings-workspaces.conf`).
130-
- **Hyper+W** → fuzzy list of **open windows** (`bindings-switcher.conf` / `switch-window.sh`).
134+
- **Hyper+W** → fuzzy list of **open windows on the current workspace** (`bindings-switcher.conf` / `switch-window.sh`).
131135
- **Hyper+D** → toggle Voxtype dictation (`bindings-hyper.conf`; stock also has Super+Ctrl+X and F9 push-to-talk).
132136
- **Cmd+Tab** (Super+Tab) → fuzzy list of **running applications** (macOS-style; one entry per app; `switch-app.sh`). Stock Super+Tab was next workspace (unbound). **Super+Space** still launches any installed app via Walker.
133137
- **Hyper+F** → fullscreen (stock was Super+F). **Cmd+F** is **Ctrl+F** (search) via keyd — so Super+F never reached Hyprland and looked “broken,” including on scrolling.
@@ -153,11 +157,26 @@ Keyboard
153157

154158
| Put it in… | When | Examples here |
155159
|------------|------|----------------|
156-
| **keyd** (`etc/keyd/default.conf`) | Physical key identity; Mac text chords that should arrive as *different* keycodes so Hyprland never sees Super for that press | Alt→Cmd layer; Win/Compose→Alt; Caps→Hyper; Cmd+A/Z/F→Ctrl+letter; Cmd+arrows→Home/End; Alt+Backspace→Ctrl+Backspace; Alt+Delete→Ctrl+Delete |
160+
| **keyd** (`etc/keyd/default.conf`) | Physical key identity; Mac text chords that should arrive as *different* keycodes so Hyprland never sees Super for that press | Alt→Cmd layer; Win/Compose→Alt; Caps→Hyper; Cmd+A/Z/F→Ctrl+letter; Cmd+arrows→Home/End; Option+Left/Right→Ctrl+arrows (word jump); Option+Backspace/Delete→Ctrl+Backspace/Delete |
157161
| **Hyprland bind** | Window-manager actions | Cmd+Q close (`bindings-close.conf`); Hyper+arrows focus + Hyper+D Voxtype + Hyper+F fullscreen (`bindings-hyper.conf`); Hyper+W / Cmd+Tab switchers (`bindings-switcher.conf`); 1Password (`bindings-1password.conf`) |
158162
| **Hyprland `sendshortcut` / wtype** | Super must stay Super for the bind, but the app needs a Linux chord | Cmd+C/V/X clipboard (stock Omarchy); Cmd+Shift+C history (`bindings-clipboard.conf`); browser Cmd+T/W/1–9 via `scripts/cmd-*-tab.sh` (`bindings-tabs.conf`, `binddn`) |
159163
| **App config** (Ghostty `config.local`, keyd `app.conf`) | App-native Super chords, or true per-app remaps | Ghostty `super+t/w/1..9` + splits; Chromium optional keyd mapper path |
160164

165+
### Chrome only (no stock Chromium)
166+
167+
Omarchy’s base image installs **Chromium**. This machine drops it in `just install-pkgs` (`omarchy pkg drop chromium`) and uses **Google Chrome** only (`omarchy default browser chrome`).
168+
169+
The **Personal** profile lives in directory `Profile 1` (not `Default` — that is “Your Chrome” / work).
170+
171+
Stock AUR `chrome-flags.conf` cannot pass `--profile-directory="Profile 1"` (the wrapper splits on spaces). Instead:
172+
173+
- `~/.local/bin/chrome-personal` launches Chrome with `--profile-directory="Profile 1"`
174+
- `~/.local/share/applications/google-chrome.desktop` points `Exec` at that wrapper so Super+Shift+B / Walker / `xdg-open` all open Personal
175+
176+
Webapps follow the default browser (Chrome) and may pin profiles (e.g. Superhuman Work → `Default`, Superhuman Personal → `Profile 1`).
177+
178+
Note: `omarchy reinstall pkgs` would put Chromium back from the base list; re-run `just install-pkgs` (or `omarchy pkg drop chromium`) after that.
179+
161180
### Chromium / browser tab chords (Cmd)
162181

163182
**Reliable path (no keyd mapper):** Hyprland `binddn` (non-consuming) + scripts (`bindings-tabs.conf`, sourced **after** `bindings-workspaces.conf`). Super also reaches the focused app:
@@ -176,6 +195,8 @@ Keyboard
176195
| Cmd+Shift+[ / ] | prev / next tab |
177196
| Cmd+Option+Left/Right | prev / next tab |
178197

198+
**Ctrl+W** in browsers is remapped to **Ctrl+Backspace** (delete previous word, macOS-style). Close tab stays **Cmd+W** (`cmd.w = C-w` / Hyprland scripts). Terminals are not remapped — real Ctrl+W stays for readline/nvim.
199+
179200
Window close remains **Cmd+Q**. Workspace switch is **Hyper+1…0**.
180201

181202

0 commit comments

Comments
 (0)