diff options
| author | pablu <me@pablu.de> | 2026-09-17 17:05:03 +0200 |
|---|---|---|
| committer | pablu <me@pablu.de> | 2026-09-17 17:05:03 +0200 |
| commit | f8312a59c775c740d9af173fafa65ab7e731e03e (patch) | |
| tree | a54a9274376f20bbb35f07bccfeab8aef542fa0e /dot_config/hypr/config | |
| parent | 0716da5eef605977b804f34f265979cf39be844b (diff) | |
update codex config to not contain local project dirs, update .tmux.conf only for gentoo, make tmux work with hyprland
Diffstat (limited to 'dot_config/hypr/config')
| -rw-r--r-- | dot_config/hypr/config/binds.lua | 54 | ||||
| -rw-r--r-- | dot_config/hypr/config/rules.lua | 10 |
2 files changed, 50 insertions, 14 deletions
diff --git a/dot_config/hypr/config/binds.lua b/dot_config/hypr/config/binds.lua index a5a9e6b..a72777f 100644 --- a/dot_config/hypr/config/binds.lua +++ b/dot_config/hypr/config/binds.lua @@ -52,6 +52,28 @@ local function ask_direct_nvim(win, direction) return response:find("success", 1, true) ~= nil end +local function ask_tmux(win, direction) + local pid = tonumber(win.pid) + + if not pid then + return false + end + + local helper = (os.getenv("HOME") or "") + .. "/.config/hypr/scripts/tmux-smart-nav" + + local handle = io.popen(string.format("%s %s %d", helper, direction, pid)) + + if not handle then + return false + end + + local result = handle:read("*a") + handle:close() + + return result:find("handled", 1, true) ~= nil +end + local function smart_nav(direction) return function() local win = hl.get_active_window() @@ -67,25 +89,29 @@ local function smart_nav(direction) local title = (win.title or ""):lower() - if title == "herdr" then + if ask_tmux(win, direction) then + return + end + + -- Herdr now uses changing window titles. The helper checks whether its + -- foreground client belongs to this terminal before attempting navigation. + local pid = tonumber(win.pid) + if pid then local helper = (os.getenv("HOME") or "") .. "/.config/hypr/scripts/herdr-smart-nav" + local handle = io.popen(string.format("%q %s %d", helper, direction, pid)) - local handle = io.popen(helper .. " " .. direction) + if handle then + local result = handle:read("*a"):match("^%s*(.-)%s*$") + handle:close() - if not handle then - focus_hyprland(direction) - return + if result == "handled" then + return + elseif result == "hyprland" then + focus_hyprland(direction) + return + end end - - local result = handle:read("*a") - handle:close() - - if result:find("hyprland", 1, true) then - focus_hyprland(direction) - end - - return end if is_direct_nvim(title) and ask_direct_nvim(win, direction) then diff --git a/dot_config/hypr/config/rules.lua b/dot_config/hypr/config/rules.lua index 0e17e4a..ca5fe88 100644 --- a/dot_config/hypr/config/rules.lua +++ b/dot_config/hypr/config/rules.lua @@ -73,3 +73,13 @@ hl.window_rule({ no_blur = true, no_shadow = true, }) + +hl.window_rule({ + name = "ghostty-fullscreen-opaque", + match = { + class = "com.mitchellh.ghostty", + fullscreen = true, + }, + force_rgbx = true, + no_blur = true, +}) |
