feat(config): add Herdr hook sourcing, disable new tab prompts, and implement workspace window cycling keybindings

This commit is contained in:
Prad Nukala committed 2026-08-31 10:20:33 -04:00
1 parent a0e841aea1
commit 72e06bcb7d
3 files changed
+57 -2

No files matched your search

+4
View File
@@ -40,3 +40,7 @@ end
# cmux
fish_add_path "/home/prad/.cmux/bin"
fish_add_path "/home/prad/.cache/.bun/bin"
for _f in $HOME/.config/herdr/plugins/github/herdr-automatic-rename-*/shell/hook.fish
test -r "$_f"; and source "$_f"; and break
end
+1 -2
View File
@@ -6,7 +6,7 @@ onboarding = false
# gradient border around the window; a second frame inside it is noise.
pane_borders = false
pane_outer_borders = false
prompt_new_tab_name = false
accent = "#5ea1ff"
[theme]
@@ -151,4 +151,3 @@ key = "prefix+shift+o"
type = "shell"
command = '"${HERDR_BIN_PATH}" plugin pane open --plugin official.browser --entrypoint browser --placement overlay --focus'
description = "open browser overlay"
+52
View File
@@ -23,6 +23,58 @@ o.bind("SUPER + W", "Toggle workspace layout", "omarchy-toggle-layout")
hl.unbind("SUPER + BACKSPACE") -- was: toggle window transparency
o.bind("SUPER + BACKSPACE", "Focus last window", hl.dsp.focus({ last = true }))
-- Mod+Tab -> switch windows inside the focused workspace. Omarchy parks the
-- workspace hop here, but SUPER + CTRL + J/K already does that, so the key is
-- free. SUPER + CTRL + TAB (former workspace) keeps its default job.
--
-- cyclenext is deliberately not used: it walks into a hidden special
-- workspace and drags the scratchpad into view. This ring is built from the
-- windows of the active workspace alone, and a workspace lives on exactly one
-- monitor, so focus never leaves the display. Grouped windows stay in the
-- ring (focusing a hidden member just flips the group to that tab); anything
-- else hidden is skipped. stable_id fixes the order, so repeated presses walk
-- the same ring instead of following focus history.
local function cycle_in_workspace(step)
return function()
local active = hl.get_active_window()
local workspace = active and active.workspace or hl.get_active_workspace()
if not workspace then
return
end
local ring = {}
for _, window in ipairs(hl.get_workspace_windows(workspace.id)) do
if window.mapped and (window.group or not window.hidden) then
ring[#ring + 1] = window
end
end
if #ring < 2 then
return
end
table.sort(ring, function(a, b)
return a.stable_id < b.stable_id
end)
local current = 1
for index, window in ipairs(ring) do
if active and window.address == active.address then
current = index
break
end
end
-- Raise after the focus, so a floating window comes up on top instead of
-- staying buried, the way Omarchy's ALT + TAB does.
hl.dispatch(hl.dsp.focus({ window = ring[(current - 1 + step) % #ring + 1] }))
hl.dispatch(hl.dsp.window.bring_to_top())
end
end
hl.unbind("SUPER + TAB") -- was: next workspace
hl.unbind("SUPER + SHIFT + TAB") -- was: previous workspace
o.bind("SUPER + TAB", "Focus on next window in workspace", cycle_in_workspace(1))
o.bind("SUPER + SHIFT + TAB", "Focus on previous window in workspace", cycle_in_workspace(-1))
-- Tabs. Hyprland groups are the nearest thing to a niri tabbed column.
-- SUPER + G (group) and SUPER + ALT + TAB (next in group) are Omarchy defaults.