Remove Chrome-backed scratchpads

This commit is contained in:
2026-04-29 14:19:15 -07:00
parent f826c6ae75
commit 34fd60e8f2
6 changed files with 3 additions and 52 deletions

View File

@@ -125,7 +125,7 @@ branch exposes `hl.plugin.hyprexpo.expo(...)`, so the Lua config can invoke
## 6. Scratchpads
- [x] Preserve named scratchpads: element, gmail, htop, messages, slack,
- [x] Preserve named scratchpads: element, htop, slack,
spotify, transmission, volume.
- [x] Preserve dropdown terminal scratchpad.
- [x] Scratchpads near-fullscreen and centered.

View File

@@ -153,9 +153,7 @@ Important behavior:
Required behavior:
- A named scratchpad exists for element.
- A named scratchpad exists for gmail.
- A named scratchpad exists for htop.
- A named scratchpad exists for messages.
- A named scratchpad exists for slack.
- A named scratchpad exists for spotify.
- A named scratchpad exists for transmission.
@@ -320,9 +318,7 @@ Required behavior:
Required behavior:
- `Super+Alt+e` toggles the element scratchpad.
- `Super+Alt+g` toggles the gmail scratchpad.
- `Super+Alt+h` toggles the htop scratchpad.
- `Super+Alt+m` toggles the messages scratchpad.
- `Super+Alt+k` toggles the slack scratchpad.
- `Super+Alt+s` toggles the spotify scratchpad.
- `Super+Alt+t` toggles the transmission scratchpad.

View File

@@ -269,9 +269,7 @@ bind = $modAlt, C, exec, google-chrome-stable
# SCRATCHPADS (managed by hyprscratch daemon with auto-dismiss)
# -----------------------------------------------------------------------------
bind = $modAlt, E, exec, hyprscratch toggle element
bind = $modAlt, G, exec, hyprscratch toggle gmail
bind = $modAlt, H, exec, hyprscratch toggle htop
bind = $modAlt, M, exec, hyprscratch toggle messages
bind = $modAlt, K, exec, hyprscratch toggle slack
bind = $modAlt, S, exec, hyprscratch toggle spotify
bind = $modAlt, T, exec, hyprscratch toggle transmission

View File

@@ -57,16 +57,6 @@ local scratchpads = {
class = "com.mitchellh.ghostty.dropdown",
dropdown = true,
},
gmail = {
command = "google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox",
class = "google-chrome",
title = "Gmail",
},
messages = {
command = "google-chrome-stable --new-window https://messages.google.com/web/conversations",
class = "google-chrome",
title = "Messages",
},
}
local function command_line_contains(needle)
@@ -1630,15 +1620,9 @@ bind(main_mod .. " + SHIFT + X", hl.dsp.workspace.toggle_special("NSP"))
bind(mod_alt .. " + E", function()
toggle_scratchpad("element")
end)
bind(mod_alt .. " + G", function()
toggle_scratchpad("gmail")
end)
bind(mod_alt .. " + H", function()
toggle_scratchpad("htop")
end)
bind(mod_alt .. " + M", function()
toggle_scratchpad("messages")
end)
bind(mod_alt .. " + K", function()
toggle_scratchpad("slack")
end)

View File

@@ -232,27 +232,19 @@ getWorkspaceDmenu = myDmenu (workspaces myConfig)
-- Selectors
isGmailTitle t = isInfixOf "@gmail.com" t && isInfixOf "Gmail" t
isMessagesTitle = isPrefixOf "Messages"
isChromeClass = isInfixOf "chrome"
noSpecialChromeTitles = helper <$> title
where helper t = not $ any ($ t) [isGmailTitle, isMessagesTitle]
chromeSelectorBase = isChromeClass <$> className
chromeSelector = chromeSelectorBase <&&> noSpecialChromeTitles
chromeSelector = chromeSelectorBase
elementSelector = className =? "Element"
emacsSelector = className =? "Emacs"
gmailSelector = chromeSelectorBase <&&> fmap isGmailTitle title
messagesSelector = chromeSelectorBase <&&> isMessagesTitle <$> title
slackSelector = className =? "Slack"
spotifySelector = className =? "Spotify"
transmissionSelector = fmap (isPrefixOf "Transmission") title
volumeSelector = className =? "Pavucontrol"
virtualClasses =
[ (gmailSelector, "Gmail")
, (messagesSelector, "Messages")
, (chromeSelector, "Chrome")
[ (chromeSelector, "Chrome")
, (transmissionSelector, "Transmission")
]
@@ -261,11 +253,7 @@ virtualClasses =
chromeCommand = "google-chrome-stable"
elementCommand = "element-desktop"
emacsCommand = "emacsclient -c"
gmailCommand =
"google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox"
htopCommand = "ghostty --title=htop -e htop"
messagesCommand =
"google-chrome-stable --new-window https://messages.google.com/web/conversations"
slackCommand = "slack"
spotifyCommand = "spotify"
transmissionCommand = "transmission-gtk"
@@ -813,9 +801,7 @@ nearFullFloat = customFloating $ W.RationalRect l t w h
scratchpads =
[ NS "element" elementCommand elementSelector nearFullFloat
, NS "gmail" gmailCommand gmailSelector nearFullFloat
, NS "htop" htopCommand (title =? "htop") nearFullFloat
, NS "messages" messagesCommand messagesSelector nearFullFloat
, NS "slack" slackCommand slackSelector nearFullFloat
, NS "spotify" spotifyCommand spotifySelector nearFullFloat
, NS "transmission" transmissionCommand transmissionSelector nearFullFloat
@@ -1025,9 +1011,7 @@ addKeys conf@XConfig { modMask = modm } =
-- ScratchPads
[ ((modalt, xK_e), doScratchpad "element")
, ((modalt, xK_g), doScratchpad "gmail")
, ((modalt, xK_h), doScratchpad "htop")
, ((modalt, xK_m), doScratchpad "messages")
, ((modalt, xK_k), doScratchpad "slack")
, ((modalt, xK_s), doScratchpad "spotify")
, ((modalt, xK_t), doScratchpad "transmission")

View File

@@ -82,17 +82,6 @@ let
rules = "float;size monitor_w monitor_h*0.5;move 0 60;noborder;noshadow;animation slide";
};
gmail = {
command = "google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox";
class = "google-chrome";
title = "Gmail";
};
messages = {
command = "google-chrome-stable --new-window https://messages.google.com/web/conversations";
class = "google-chrome";
title = "Messages";
};
};
enabledModule = makeEnable config "myModules.hyprland" true {
# Install both shell service units so `desktop_shell_ui set ...` can switch