From 72e06bcb7d262c66aa1578fe9e79cc2d749f77a8 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 31 Aug 2026 10:20:33 -0400 Subject: [PATCH] feat(config): add Herdr hook sourcing, disable new tab prompts, and implement workspace window cycling keybindings --- dot_config/fish/config.fish | 4 +++ dot_config/herdr/config.toml | 3 +-- dot_config/hypr/bindings.lua | 52 ++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/dot_config/fish/config.fish b/dot_config/fish/config.fish index 57bee2e..2ddf29f 100644 --- a/dot_config/fish/config.fish +++ b/dot_config/fish/config.fish @@ -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 diff --git a/dot_config/herdr/config.toml b/dot_config/herdr/config.toml index 2dea7d6..3f010b6 100644 --- a/dot_config/herdr/config.toml +++ b/dot_config/herdr/config.toml @@ -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" - diff --git a/dot_config/hypr/bindings.lua b/dot_config/hypr/bindings.lua index 87ebc90..ca61b07 100644 --- a/dot_config/hypr/bindings.lua +++ b/dot_config/hypr/bindings.lua @@ -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.