summaryrefslogtreecommitdiffhomepage
path: root/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/XMonadLog.hs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Plugins/XMonadLog.hs b/Plugins/XMonadLog.hs
index 34fae31..3461e26 100644
--- a/Plugins/XMonadLog.hs
+++ b/Plugins/XMonadLog.hs
@@ -30,13 +30,19 @@ import Foreign.C (CChar)
import XUtil (nextEvent')
-data XMonadLog = XMonadLog
+data XMonadLog = XMonadLog | XPropertyLog String
deriving (Read, Show)
instance Exec XMonadLog where
- start XMonadLog cb = do
+ alias XMonadLog = "XMonadLog"
+ alias (XPropertyLog atom) = atom
+
+ start x cb = do
+ let atom = case x of
+ XMonadLog -> "_XMONAD_LOG"
+ XPropertyLog a -> a
d <- openDisplay ""
- xlog <- internAtom d "_XMONAD_LOG" False
+ xlog <- internAtom d atom False
root <- rootWindow d (defaultScreen d)
selectInput d root propertyChangeMask