From 5967595c09acc044e5a307a939a9d699ff090db4 Mon Sep 17 00:00:00 2001 From: Alan Roman Date: Wed, 2 Sep 2026 20:57:53 -0500 Subject: [PATCH 1/3] Add SUPER+A universal select all keybinding Copy, paste, and cut all have SUPER shortcuts, but select all still required CTRL+A. Add it alongside them, skipping terminal windows since CTRL+A there is readline's "move to start of line" rather than select-all. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_012FgNnd3XE7c2jL478nscw6 --- default/hypr/bindings/clipboard.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/default/hypr/bindings/clipboard.lua b/default/hypr/bindings/clipboard.lua index f095ea5cd648..cc008275d90a 100644 --- a/default/hypr/bindings/clipboard.lua +++ b/default/hypr/bindings/clipboard.lua @@ -46,3 +46,13 @@ o.bind("SUPER + C", "Universal copy", universal_clipboard_shortcut("CTRL", "C", o.bind("SUPER + V", "Universal paste", universal_clipboard_shortcut("CTRL", "V", "SHIFT", "Insert")) o.bind("SUPER + X", "Universal cut", send_shortcut_once("CTRL", "X")) o.bind("SUPER + CTRL + V", "Clipboard manager", "omarchy-shell shell toggle omarchy.clipboard") + +-- Skipped in terminals: CTRL+A there is readline's "move to start of line", +-- not select-all, so forwarding it would silently move the cursor instead. +o.bind("SUPER + A", "Universal select all", function() + if active_window_is_terminal() then + return + end + + send_shortcut_once("CTRL", "A")() +end) From 1e2c93929b16ad28ba9a9553ce5d9d870d04cfad Mon Sep 17 00:00:00 2001 From: Alan Roman Date: Wed, 2 Sep 2026 23:10:45 -0500 Subject: [PATCH 2/3] Make SUPER+A select all universal, including terminals Per review feedback: instead of a no-op in terminal windows, forward CTRL+SHIFT+A there so the shortcut works everywhere, matching how SUPER+C/V already special-case terminal key combos rather than skipping terminals outright. Reuses the existing universal_clipboard_shortcut helper. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01UByBunyAcPCN8Wyo2fwXpM --- default/hypr/bindings/clipboard.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/default/hypr/bindings/clipboard.lua b/default/hypr/bindings/clipboard.lua index cc008275d90a..1f7dd2609a46 100644 --- a/default/hypr/bindings/clipboard.lua +++ b/default/hypr/bindings/clipboard.lua @@ -46,13 +46,4 @@ o.bind("SUPER + C", "Universal copy", universal_clipboard_shortcut("CTRL", "C", o.bind("SUPER + V", "Universal paste", universal_clipboard_shortcut("CTRL", "V", "SHIFT", "Insert")) o.bind("SUPER + X", "Universal cut", send_shortcut_once("CTRL", "X")) o.bind("SUPER + CTRL + V", "Clipboard manager", "omarchy-shell shell toggle omarchy.clipboard") - --- Skipped in terminals: CTRL+A there is readline's "move to start of line", --- not select-all, so forwarding it would silently move the cursor instead. -o.bind("SUPER + A", "Universal select all", function() - if active_window_is_terminal() then - return - end - - send_shortcut_once("CTRL", "A")() -end) +o.bind("SUPER + A", "Universal select all", universal_clipboard_shortcut("CTRL", "A", "CTRL SHIFT", "A")) From 1e3a0d0f759d6d50a355e1cd4f2bfa67909f44f2 Mon Sep 17 00:00:00 2001 From: Alan Roman Date: Thu, 3 Sep 2026 17:42:59 -0500 Subject: [PATCH 3/3] Only forward select-all to Ghostty, no-op in other terminals Per review feedback: foot, kitty, and Alacritty have no keyboard- triggerable select-all action to forward to. Verified directly by sending CTRL+SHIFT+A into each terminal's pty and inspecting the raw bytes received: - foot and Alacritty both collapse CTRL+SHIFT+A to the same byte as plain CTRL+A (0x01), so forwarding it would reintroduce the exact bug this binding is meant to fix - it silently runs readline's "move to start of line" instead of doing nothing. - kitty sends a distinct but unbound CSI-u sequence, which readline ignores (a harmless no-op, but still not select-all). - Ghostty is the only one of the four that ships a real select_all action, bound to CTRL+SHIFT+A by default (`ghostty +list-keybinds --default`), and consumes the chord itself before it reaches the shell. So SUPER+A now checks for Ghostty specifically (window.class == "com.mitchellh.ghostty", matching the regex already used to tag terminals in default/hypr/apps/terminals.lua) and forwards CTRL+SHIFT+A only there; other terminals get a no-op. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_0117QTgSe8i9Sp8gry3KzW27 --- default/hypr/bindings/clipboard.lua | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/default/hypr/bindings/clipboard.lua b/default/hypr/bindings/clipboard.lua index 1f7dd2609a46..eaea18831f03 100644 --- a/default/hypr/bindings/clipboard.lua +++ b/default/hypr/bindings/clipboard.lua @@ -46,4 +46,25 @@ o.bind("SUPER + C", "Universal copy", universal_clipboard_shortcut("CTRL", "C", o.bind("SUPER + V", "Universal paste", universal_clipboard_shortcut("CTRL", "V", "SHIFT", "Insert")) o.bind("SUPER + X", "Universal cut", send_shortcut_once("CTRL", "X")) o.bind("SUPER + CTRL + V", "Clipboard manager", "omarchy-shell shell toggle omarchy.clipboard") -o.bind("SUPER + A", "Universal select all", universal_clipboard_shortcut("CTRL", "A", "CTRL SHIFT", "A")) + +-- Of Omarchy's terminal options, only Ghostty has a select-all action to +-- forward to (`ghostty +list-keybinds --default` ships CTRL+SHIFT+A as +-- select_all). foot, kitty, and Alacritty expose no keyboard-triggerable +-- select-all at all, so forwarding CTRL+A there would just fall through to +-- readline's "move to start of line" instead - a no-op is more honest than +-- a shortcut that silently moves the cursor. +local function active_window_is_ghostty() + local window = hl.get_active_window() + return window ~= nil and window.class == "com.mitchellh.ghostty" +end + +o.bind("SUPER + A", "Universal select all", function() + if active_window_is_terminal() then + if active_window_is_ghostty() then + send_shortcut_once("CTRL SHIFT", "A")() + end + return + end + + send_shortcut_once("CTRL", "A")() +end)