diff options
| author | Josh Rahm <rahm@google.com> | 2024-03-15 11:02:29 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2024-03-15 11:02:29 -0600 |
| commit | 8ddcf499ce97be0aa607677cbca52d810c969684 (patch) | |
| tree | 2204886b18985849b18e9fd9545971485c2956d1 /src/Main.hs | |
| parent | b1bd3547e761d61f8d0ce96d55ab1fd92ed8ce19 (diff) | |
| download | rde-wip_mapping_keycodes.tar.gz rde-wip_mapping_keycodes.tar.bz2 rde-wip_mapping_keycodes.zip | |
Add some keybindings. Add some manage hooks.wip_mapping_keycodes
Diffstat (limited to 'src/Main.hs')
| -rw-r--r-- | src/Main.hs | 19 |
1 files changed, 14 insertions, 5 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 |