mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(config): add Herdr hook sourcing, disable new tab prompts, and implement workspace window cycling keybindings
This commit is contained in:
1 parent
a0e841aea1
commit
72e06bcb7d
3 files changed
+57
-2
No files matched your search
@@ -40,3 +40,7 @@ end
|
|||||||
# cmux
|
# cmux
|
||||||
fish_add_path "/home/prad/.cmux/bin"
|
fish_add_path "/home/prad/.cmux/bin"
|
||||||
fish_add_path "/home/prad/.cache/.bun/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
|
||||||
@@ -6,7 +6,7 @@ onboarding = false
|
|||||||
# gradient border around the window; a second frame inside it is noise.
|
# gradient border around the window; a second frame inside it is noise.
|
||||||
pane_borders = false
|
pane_borders = false
|
||||||
pane_outer_borders = false
|
pane_outer_borders = false
|
||||||
|
prompt_new_tab_name = false
|
||||||
accent = "#5ea1ff"
|
accent = "#5ea1ff"
|
||||||
|
|
||||||
[theme]
|
[theme]
|
||||||
@@ -151,4 +151,3 @@ key = "prefix+shift+o"
|
|||||||
type = "shell"
|
type = "shell"
|
||||||
command = '"${HERDR_BIN_PATH}" plugin pane open --plugin official.browser --entrypoint browser --placement overlay --focus'
|
command = '"${HERDR_BIN_PATH}" plugin pane open --plugin official.browser --entrypoint browser --placement overlay --focus'
|
||||||
description = "open browser overlay"
|
description = "open browser overlay"
|
||||||
|
|
||||||
@@ -23,6 +23,58 @@ o.bind("SUPER + W", "Toggle workspace layout", "omarchy-toggle-layout")
|
|||||||
hl.unbind("SUPER + BACKSPACE") -- was: toggle window transparency
|
hl.unbind("SUPER + BACKSPACE") -- was: toggle window transparency
|
||||||
o.bind("SUPER + BACKSPACE", "Focus last window", hl.dsp.focus({ last = true }))
|
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.
|
-- 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.
|
-- SUPER + G (group) and SUPER + ALT + TAB (next in group) are Omarchy defaults.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user