From 4ec1f053983150900d19302e8edc0b70b2fd3f3c Mon Sep 17 00:00:00 2001 From: Roman Cheplyaka Date: Mon, 17 Nov 2008 08:37:09 +0100 Subject: Monitor: improved the docs darcs-hash:20081117073709-3ebed-a862abc4c0fdcf7c7bf129ad0c3839d7022c151c.gz --- XMonad/Layout/Monitor.hs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'XMonad/Layout/Monitor.hs') diff --git a/XMonad/Layout/Monitor.hs b/XMonad/Layout/Monitor.hs index d46f914..b9a3233 100644 --- a/XMonad/Layout/Monitor.hs +++ b/XMonad/Layout/Monitor.hs @@ -44,6 +44,10 @@ import Control.Monad -- -- > myLayouts = addMonitor (ClassName "Cairo-clock" `And` Title "MacSlow's Cairo-Clock") (Rectangle (1280-150) (800-150) 150 150) $ tall ||| Full ||| ... -- +-- And make the desired window unmanaged with ManageHook: +-- +-- > , className =? "Cairo-clock"--> doIgnore +-- -- After that, if there exists a window with specified properties, it will be -- displayed on top of all /tiled/ (not floated) windows on specified -- position. @@ -107,14 +111,16 @@ addNamedPersistentMonitor :: String -> Property -> Rectangle -> l a -> ModifiedL addNamedPersistentMonitor name p r = ModifiedLayout (Monitor p r True (Just name) True) -- $hints --- - This module assumes that there is only one window satisfying property exists. Also it's good idea to make it unmanaged and (optionally) hide it using ManageHook: +-- - This module assumes that there is only one window satisfying property exists. -- --- > className =? "Cairo-clock"--> (ask >>= \w -> liftX (hide w) >> doF (W.delete w)) +-- - If you want the monitor to be available on /all/ layouts, use +-- 'addPersistentMonitor' instead of 'addMonitor' to avoid unnecessary +-- flickering. You can still toggle monitor with a keybinding. -- --- - If you want monitor to be available on /all/ layouts, there's no point in --- hiding it. Also use 'addPersistentMonitor' instead of --- 'addMonitor' to avoid unnecessary flickering. You can still toggle --- monitor with a keybinding. +-- - On the other hand, if you use the monitor only with some of the layouts, you +-- might want to hide it on the startup. Then change ManageHook to the following: +-- +-- > className =? "Cairo-clock"--> (ask >>= \w -> liftX (hide w) >> doF (W.delete w)) -- -- - You can use several monitors with nested modifiers. Give them a name using -- 'addNamedMonitor' or 'addNamedPersistentMonitor' to be able to toggle @@ -129,3 +135,5 @@ addNamedPersistentMonitor name p r = ModifiedLayout (Monitor p r True (Just name -- - automatically unmanage the window? -- -- - specify position relative to the screen +-- +-- - toggle monitor on all workspaces (how?) -- cgit v1.2.3