Remove Chrome-backed scratchpads
This commit is contained in:
@@ -125,7 +125,7 @@ branch exposes `hl.plugin.hyprexpo.expo(...)`, so the Lua config can invoke
|
|||||||
|
|
||||||
## 6. Scratchpads
|
## 6. Scratchpads
|
||||||
|
|
||||||
- [x] Preserve named scratchpads: element, gmail, htop, messages, slack,
|
- [x] Preserve named scratchpads: element, htop, slack,
|
||||||
spotify, transmission, volume.
|
spotify, transmission, volume.
|
||||||
- [x] Preserve dropdown terminal scratchpad.
|
- [x] Preserve dropdown terminal scratchpad.
|
||||||
- [x] Scratchpads near-fullscreen and centered.
|
- [x] Scratchpads near-fullscreen and centered.
|
||||||
|
|||||||
@@ -153,9 +153,7 @@ Important behavior:
|
|||||||
Required behavior:
|
Required behavior:
|
||||||
|
|
||||||
- A named scratchpad exists for element.
|
- A named scratchpad exists for element.
|
||||||
- A named scratchpad exists for gmail.
|
|
||||||
- A named scratchpad exists for htop.
|
- A named scratchpad exists for htop.
|
||||||
- A named scratchpad exists for messages.
|
|
||||||
- A named scratchpad exists for slack.
|
- A named scratchpad exists for slack.
|
||||||
- A named scratchpad exists for spotify.
|
- A named scratchpad exists for spotify.
|
||||||
- A named scratchpad exists for transmission.
|
- A named scratchpad exists for transmission.
|
||||||
@@ -320,9 +318,7 @@ Required behavior:
|
|||||||
Required behavior:
|
Required behavior:
|
||||||
|
|
||||||
- `Super+Alt+e` toggles the element scratchpad.
|
- `Super+Alt+e` toggles the element scratchpad.
|
||||||
- `Super+Alt+g` toggles the gmail scratchpad.
|
|
||||||
- `Super+Alt+h` toggles the htop scratchpad.
|
- `Super+Alt+h` toggles the htop scratchpad.
|
||||||
- `Super+Alt+m` toggles the messages scratchpad.
|
|
||||||
- `Super+Alt+k` toggles the slack scratchpad.
|
- `Super+Alt+k` toggles the slack scratchpad.
|
||||||
- `Super+Alt+s` toggles the spotify scratchpad.
|
- `Super+Alt+s` toggles the spotify scratchpad.
|
||||||
- `Super+Alt+t` toggles the transmission scratchpad.
|
- `Super+Alt+t` toggles the transmission scratchpad.
|
||||||
|
|||||||
@@ -269,9 +269,7 @@ bind = $modAlt, C, exec, google-chrome-stable
|
|||||||
# SCRATCHPADS (managed by hyprscratch daemon with auto-dismiss)
|
# SCRATCHPADS (managed by hyprscratch daemon with auto-dismiss)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
bind = $modAlt, E, exec, hyprscratch toggle element
|
bind = $modAlt, E, exec, hyprscratch toggle element
|
||||||
bind = $modAlt, G, exec, hyprscratch toggle gmail
|
|
||||||
bind = $modAlt, H, exec, hyprscratch toggle htop
|
bind = $modAlt, H, exec, hyprscratch toggle htop
|
||||||
bind = $modAlt, M, exec, hyprscratch toggle messages
|
|
||||||
bind = $modAlt, K, exec, hyprscratch toggle slack
|
bind = $modAlt, K, exec, hyprscratch toggle slack
|
||||||
bind = $modAlt, S, exec, hyprscratch toggle spotify
|
bind = $modAlt, S, exec, hyprscratch toggle spotify
|
||||||
bind = $modAlt, T, exec, hyprscratch toggle transmission
|
bind = $modAlt, T, exec, hyprscratch toggle transmission
|
||||||
|
|||||||
@@ -57,16 +57,6 @@ local scratchpads = {
|
|||||||
class = "com.mitchellh.ghostty.dropdown",
|
class = "com.mitchellh.ghostty.dropdown",
|
||||||
dropdown = true,
|
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)
|
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()
|
bind(mod_alt .. " + E", function()
|
||||||
toggle_scratchpad("element")
|
toggle_scratchpad("element")
|
||||||
end)
|
end)
|
||||||
bind(mod_alt .. " + G", function()
|
|
||||||
toggle_scratchpad("gmail")
|
|
||||||
end)
|
|
||||||
bind(mod_alt .. " + H", function()
|
bind(mod_alt .. " + H", function()
|
||||||
toggle_scratchpad("htop")
|
toggle_scratchpad("htop")
|
||||||
end)
|
end)
|
||||||
bind(mod_alt .. " + M", function()
|
|
||||||
toggle_scratchpad("messages")
|
|
||||||
end)
|
|
||||||
bind(mod_alt .. " + K", function()
|
bind(mod_alt .. " + K", function()
|
||||||
toggle_scratchpad("slack")
|
toggle_scratchpad("slack")
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -232,27 +232,19 @@ getWorkspaceDmenu = myDmenu (workspaces myConfig)
|
|||||||
|
|
||||||
-- Selectors
|
-- Selectors
|
||||||
|
|
||||||
isGmailTitle t = isInfixOf "@gmail.com" t && isInfixOf "Gmail" t
|
|
||||||
isMessagesTitle = isPrefixOf "Messages"
|
|
||||||
isChromeClass = isInfixOf "chrome"
|
isChromeClass = isInfixOf "chrome"
|
||||||
noSpecialChromeTitles = helper <$> title
|
|
||||||
where helper t = not $ any ($ t) [isGmailTitle, isMessagesTitle]
|
|
||||||
chromeSelectorBase = isChromeClass <$> className
|
chromeSelectorBase = isChromeClass <$> className
|
||||||
|
|
||||||
chromeSelector = chromeSelectorBase <&&> noSpecialChromeTitles
|
chromeSelector = chromeSelectorBase
|
||||||
elementSelector = className =? "Element"
|
elementSelector = className =? "Element"
|
||||||
emacsSelector = className =? "Emacs"
|
emacsSelector = className =? "Emacs"
|
||||||
gmailSelector = chromeSelectorBase <&&> fmap isGmailTitle title
|
|
||||||
messagesSelector = chromeSelectorBase <&&> isMessagesTitle <$> title
|
|
||||||
slackSelector = className =? "Slack"
|
slackSelector = className =? "Slack"
|
||||||
spotifySelector = className =? "Spotify"
|
spotifySelector = className =? "Spotify"
|
||||||
transmissionSelector = fmap (isPrefixOf "Transmission") title
|
transmissionSelector = fmap (isPrefixOf "Transmission") title
|
||||||
volumeSelector = className =? "Pavucontrol"
|
volumeSelector = className =? "Pavucontrol"
|
||||||
|
|
||||||
virtualClasses =
|
virtualClasses =
|
||||||
[ (gmailSelector, "Gmail")
|
[ (chromeSelector, "Chrome")
|
||||||
, (messagesSelector, "Messages")
|
|
||||||
, (chromeSelector, "Chrome")
|
|
||||||
, (transmissionSelector, "Transmission")
|
, (transmissionSelector, "Transmission")
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -261,11 +253,7 @@ virtualClasses =
|
|||||||
chromeCommand = "google-chrome-stable"
|
chromeCommand = "google-chrome-stable"
|
||||||
elementCommand = "element-desktop"
|
elementCommand = "element-desktop"
|
||||||
emacsCommand = "emacsclient -c"
|
emacsCommand = "emacsclient -c"
|
||||||
gmailCommand =
|
|
||||||
"google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox"
|
|
||||||
htopCommand = "ghostty --title=htop -e htop"
|
htopCommand = "ghostty --title=htop -e htop"
|
||||||
messagesCommand =
|
|
||||||
"google-chrome-stable --new-window https://messages.google.com/web/conversations"
|
|
||||||
slackCommand = "slack"
|
slackCommand = "slack"
|
||||||
spotifyCommand = "spotify"
|
spotifyCommand = "spotify"
|
||||||
transmissionCommand = "transmission-gtk"
|
transmissionCommand = "transmission-gtk"
|
||||||
@@ -813,9 +801,7 @@ nearFullFloat = customFloating $ W.RationalRect l t w h
|
|||||||
|
|
||||||
scratchpads =
|
scratchpads =
|
||||||
[ NS "element" elementCommand elementSelector nearFullFloat
|
[ NS "element" elementCommand elementSelector nearFullFloat
|
||||||
, NS "gmail" gmailCommand gmailSelector nearFullFloat
|
|
||||||
, NS "htop" htopCommand (title =? "htop") nearFullFloat
|
, NS "htop" htopCommand (title =? "htop") nearFullFloat
|
||||||
, NS "messages" messagesCommand messagesSelector nearFullFloat
|
|
||||||
, NS "slack" slackCommand slackSelector nearFullFloat
|
, NS "slack" slackCommand slackSelector nearFullFloat
|
||||||
, NS "spotify" spotifyCommand spotifySelector nearFullFloat
|
, NS "spotify" spotifyCommand spotifySelector nearFullFloat
|
||||||
, NS "transmission" transmissionCommand transmissionSelector nearFullFloat
|
, NS "transmission" transmissionCommand transmissionSelector nearFullFloat
|
||||||
@@ -1025,9 +1011,7 @@ addKeys conf@XConfig { modMask = modm } =
|
|||||||
|
|
||||||
-- ScratchPads
|
-- ScratchPads
|
||||||
[ ((modalt, xK_e), doScratchpad "element")
|
[ ((modalt, xK_e), doScratchpad "element")
|
||||||
, ((modalt, xK_g), doScratchpad "gmail")
|
|
||||||
, ((modalt, xK_h), doScratchpad "htop")
|
, ((modalt, xK_h), doScratchpad "htop")
|
||||||
, ((modalt, xK_m), doScratchpad "messages")
|
|
||||||
, ((modalt, xK_k), doScratchpad "slack")
|
, ((modalt, xK_k), doScratchpad "slack")
|
||||||
, ((modalt, xK_s), doScratchpad "spotify")
|
, ((modalt, xK_s), doScratchpad "spotify")
|
||||||
, ((modalt, xK_t), doScratchpad "transmission")
|
, ((modalt, xK_t), doScratchpad "transmission")
|
||||||
|
|||||||
@@ -82,17 +82,6 @@ let
|
|||||||
rules = "float;size monitor_w monitor_h*0.5;move 0 60;noborder;noshadow;animation slide";
|
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 {
|
enabledModule = makeEnable config "myModules.hyprland" true {
|
||||||
# Install both shell service units so `desktop_shell_ui set ...` can switch
|
# Install both shell service units so `desktop_shell_ui set ...` can switch
|
||||||
|
|||||||
Reference in New Issue
Block a user