vanadium/xmonad: handle zen and launch it instead of firefox

This commit is contained in:
Primrose 2025-11-26 14:58:25 +08:00
parent bc2a414ef5
commit 4c4ed165b3
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -95,7 +95,7 @@ isEvolutionComposer =
] ]
isFirefox :: Query Bool isFirefox :: Query Bool
isFirefox = className =? "firefox" isFirefox = className =? "firefox" <||> className ^? "zen"
isSpotify :: Query Bool isSpotify :: Query Bool
isSpotify = isFirefox <&&> title ~? "Spotify" isSpotify = isFirefox <&&> title ~? "Spotify"
@ -112,9 +112,11 @@ isSignal = className =? "Signal"
isElement :: Query Bool isElement :: Query Bool
isElement = isFirefox <&&> title ~? "Element" isElement = isFirefox <&&> title ~? "Element"
-- This changes depending on the locale of the browser :/
isFirefoxPip :: Query Bool isFirefoxPip :: Query Bool
isFirefoxPip = isFirefox <&&> title =? "Incrustation vidéo" isFirefoxPip =
isFirefox
-- This changes depending on the locale of the browser :/
<&&> (title =? "Incrustation vidéo" <||> title =? "Picture-in-Picture")
isPavucontrol :: Query Bool isPavucontrol :: Query Bool
isPavucontrol = className =? "pavucontrol" isPavucontrol = className =? "pavucontrol"
@ -223,7 +225,9 @@ myStartupHook = do
-- - setting `home.sessionVariable` (home-manager) would only effect shells, probably due to the order of launched processes blah blah -- - setting `home.sessionVariable` (home-manager) would only effect shells, probably due to the order of launched processes blah blah
-- - setting `environment.sessionVariables` (NixOS) would make my set up less portable -- - setting `environment.sessionVariables` (NixOS) would make my set up less portable
putEnv "GLFW_IM_MODULE=ibus" -- Make sure kitty knows how to talk to fcitx putEnv "GLFW_IM_MODULE=ibus" -- Make sure kitty knows how to talk to fcitx
putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox
-- TODO: doesn't work for firefox nor for zen since 145.0
-- putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox
removedKeybinds :: [(KeyMask, KeySym)] removedKeybinds :: [(KeyMask, KeySym)]
removedKeybinds = removedKeybinds =
@ -309,7 +313,7 @@ keybinds =
) )
-- Launcher -- Launcher
++ (let launchFirefox = "if type firefox; then firefox; else firefox-esr; fi" ++ (let launchFirefox = "zen"
launchDmenu = "dmenu_run -i -fn \"Iosevka-14\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10" launchDmenu = "dmenu_run -i -fn \"Iosevka-14\" -nb \"#36363a\" -nf \"#e2e2e4\" -sb \"#f7f7f8\" -sf \"#36363a\" -l 10"
lock = "xscreensaver-command -lock" lock = "xscreensaver-command -lock"
in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" ) in [ ((controlMask .|. altMask, xK_m), namedScratchpadAction myScratchpads "cmus" )