From dc95fe6561625903d0b63a6e855bd3bdf3d4ade7 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 5 May 2026 01:41:50 -0700 Subject: [PATCH] Add Codex scratchpad --- docs/tiling-wm-experience.md | 3 ++- dotfiles/config/hypr/hyprland.lua | 7 +++++++ dotfiles/config/xmonad/xmonad.hs | 8 ++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/tiling-wm-experience.md b/docs/tiling-wm-experience.md index 3696aa7b..399a5d3b 100644 --- a/docs/tiling-wm-experience.md +++ b/docs/tiling-wm-experience.md @@ -198,6 +198,7 @@ Important behavior: Required behavior: +- A named scratchpad exists for codex. - A named scratchpad exists for element. - A named scratchpad exists for htop. - A named scratchpad exists for slack. @@ -383,6 +384,7 @@ Required behavior: Required behavior: +- `Super+Alt+c` toggles the codex scratchpad. - `Super+Alt+e` toggles the element scratchpad. - `Super+Alt+h` toggles the htop scratchpad. - `Super+Alt+k` toggles the slack scratchpad. @@ -393,7 +395,6 @@ Required behavior: Important behavior: - `Super+Alt+grave` toggles the dropdown terminal scratchpad. -- `Super+Alt+c` raises or starts the browser. - `Super+Alt+Return` enters the minimized-window picker or restores minimized windows, depending on environment support. - `Super+Alt` is reserved for app-specific raise/spawn, scratchpad, and diff --git a/dotfiles/config/hypr/hyprland.lua b/dotfiles/config/hypr/hyprland.lua index e8b3c81e..6765ef79 100644 --- a/dotfiles/config/hypr/hyprland.lua +++ b/dotfiles/config/hypr/hyprland.lua @@ -55,6 +55,10 @@ hl.monitor({ }) local scratchpads = { + codex = { + command = "codex-desktop", + class = "codex-desktop", + }, htop = { command = "alacritty --class htop-scratch --title htop -e htop", class = "htop-scratch", @@ -2100,6 +2104,9 @@ bind(mod_alt .. " + W", show_active_window_info) bind(main_mod .. " + X", exec("rofi_command.sh")) bind(main_mod .. " + SHIFT + X", hl.dsp.workspace.toggle_special("NSP")) +bind(mod_alt .. " + C", function() + toggle_scratchpad("codex") +end) bind(mod_alt .. " + E", function() toggle_scratchpad("element") end) diff --git a/dotfiles/config/xmonad/xmonad.hs b/dotfiles/config/xmonad/xmonad.hs index 3a587887..6fdfec20 100644 --- a/dotfiles/config/xmonad/xmonad.hs +++ b/dotfiles/config/xmonad/xmonad.hs @@ -236,6 +236,7 @@ isChromeClass = isInfixOf "chrome" chromeSelectorBase = isChromeClass <$> className chromeSelector = chromeSelectorBase +codexSelector = className =? "codex-desktop" elementSelector = className =? "Element" emacsSelector = className =? "Emacs" slackSelector = className =? "Slack" @@ -250,6 +251,7 @@ virtualClasses = -- Commands +codexCommand = "codex-desktop" elementCommand = "element-desktop" emacsCommand = "emacsclient -c" htopCommand = "ghostty --title=htop -e htop" @@ -799,7 +801,8 @@ nearFullFloat = customFloating $ W.RationalRect l t w h scratchpads = - [ NS "element" elementCommand elementSelector nearFullFloat + [ NS "codex" codexCommand codexSelector nearFullFloat + , NS "element" elementCommand elementSelector nearFullFloat , NS "htop" htopCommand (title =? "htop") nearFullFloat , NS "slack" slackCommand slackSelector nearFullFloat , NS "spotify" spotifyCommand spotifySelector nearFullFloat @@ -1004,7 +1007,8 @@ addKeys conf@XConfig { modMask = modm } = (hyper .|. shiftMask) (followingWindow . (`screenSwap` True)) ++ -- ScratchPads - [ ((modalt, xK_e), doScratchpad "element") + [ ((modalt, xK_c), doScratchpad "codex") + , ((modalt, xK_e), doScratchpad "element") , ((modalt, xK_h), doScratchpad "htop") , ((modalt, xK_k), doScratchpad "slack") , ((modalt, xK_s), doScratchpad "spotify")