diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 3866937..57ca2e0 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -17,9 +17,9 @@ import Control.Monad.Writer lift, tell, ) -import Data.Char (isAlpha) +import Data.Char (isAlpha, toLower) import Data.IORef -import Data.List (foldl') +import Data.List (foldl', isInfixOf) import Data.List.Safe ((!!)) import Data.Map (Map) import qualified Data.Map as Map @@ -1350,7 +1350,7 @@ windowSpecificBindings config = do rawMask (m .|. mod3Mask) $ emitKey (m .|. controlMask, xK_Page_Down) - configureIf (flip elem browsers <$> className) $ do + configureIf ((\c -> any ($ c) browsers) <$> className) $ do -- if the window is a browser, configure these bindings. Lots of browsers -- make up their own garbage bindings that are not standard across many -- other applications. This alleviates the issue. @@ -1407,8 +1407,7 @@ windowSpecificBindings config = do noMod $ emitKey (controlMask, xK_F2) where - browsers = ["Google-chrome", "Brave-browser", "firefox-default", "Firefox"] - spotify = ["Spotify"] + browsers = [(=="Google-chrome"), (=="Brave-browser"), ("firefox"`isInfixOf`) . map toLower] -- Create a permutation from a list of modifiers. -- |