diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Main.hs | 19 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 18 |
2 files changed, 14 insertions, 23 deletions
diff --git a/src/Main.hs b/src/Main.hs index f0059d7..936163e 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,10 +1,11 @@ import Control.Monad.Reader ( MonadReader (ask), ReaderT (runReaderT), + liftM2, ) import Data.Char (toUpper) -import Data.List (isPrefixOf) -import Data.Monoid (Endo (Endo)) +import Data.List (isInfixOf, isPrefixOf) +import Data.Monoid (All (All), Endo (Endo)) import qualified Rahm.Desktop.BorderColors import Rahm.Desktop.Common ( Location (Location), @@ -15,7 +16,7 @@ import Rahm.Desktop.History (historyHook) import Rahm.Desktop.Hooks.WindowChange (withStackChangeHook) import Rahm.Desktop.Keys (applyKeys) import Rahm.Desktop.Layout (myLayout) -import Rahm.Desktop.Logger (LogLevel (Debug, Info), logs) +import Rahm.Desktop.Logger (LogLevel (Debug, Info, Trace), logs) import Rahm.Desktop.Marking (Mark, markAllLocations) import Rahm.Desktop.RebindKeys (WindowHook, remapHook) import qualified Rahm.Desktop.StackSet as W @@ -54,6 +55,7 @@ import XMonad composeAll, doF, doFloat, + doIgnore, floatLocation, liftX, mod4Mask, @@ -112,11 +114,13 @@ main = do className =? "Tilda" --> doFloat, className =? "yakuake" --> doFloat, className =? "MPlayer" --> doFloat, + className =? "Xfce4-notifyd" --> doIgnore, title =? "Event Tester" --> doFloat, title =? "Floating Term" --> doCenterFloat, title =? "Notes" --> doCenterFloat, title =? "xmessage" --> doCenterFloat, title =? "gxmessage" --> doCenterFloat, + fmap (isInfixOf "wlroots") title --> doCenterFloat, title =? "Volume Control" --> doCenterFloat, className =? "mpv" --> doFloat, className =? "gnubby_ssh_prompt" --> doFloat, @@ -127,10 +131,11 @@ main = do -- monitors on boot. If you need more than 15 monitors, you'll have to -- configure those ones after starting XMonad. workspaces = - map return (['w', 'r', 'j', 's', 't'] ++ ['0'..'9']), + map return (['w', 'r', 'j', 's', 't'] ++ ['0' .. '9']), handleEventHook = composeAll - [ fullscreenEventHook, + [ traceLogHook, + fullscreenEventHook, remapHook, dynamicTitle ( composeAll @@ -142,6 +147,10 @@ main = do clickJustFocuses = False, logHook = logHook xmobar } + where + traceLogHook e = do + logs Trace "Event found: %s" (show e) + (return (All True) :: X All) -- Should the chrome window float? Returns false if the window's title starts -- with "New Tab" because this usually means a new window was launched. If the diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index a6d1a8a..3866937 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -1350,24 +1350,6 @@ windowSpecificBindings config = do rawMask (m .|. mod3Mask) $ emitKey (m .|. controlMask, xK_Page_Down) - configureIf (flip elem (browsers ++ spotify) <$> className) $ do - bind xK_h $ do - rawMask controlMask $ emitKey (0, xK_BackSpace) - forM_ mods $ \mask -> - rawMask (altMask .|. mask) $ emitKey (mask, xK_Left) - - bind xK_t $ - forM_ mods $ \mask -> - rawMask (altMask .|. mask) $ emitKey (mask, xK_Down) - - bind xK_c $ - forM_ mods $ \mask -> - rawMask (altMask .|. mask) $ emitKey (mask, xK_Up) - - bind xK_n $ - forM_ mods $ \mask -> - rawMask (altMask .|. mask) $ emitKey (mask, xK_Right) - configureIf (flip elem 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 |