diff options
author | Jose Antonio Ortega Ruiz <jao@imladris> | 2014-05-30 23:33:44 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@imladris> | 2014-05-30 23:33:44 +0200 |
commit | 6dd945510c09ff65c0c9976e123279d264aa4d14 (patch) | |
tree | b275da4f6d33e7daaa64201750bdae5d996a4ba2 /src | |
parent | efe48f337ffbc0c3002f18ca52d8b9aa529e6209 (diff) | |
download | xmobar-6dd945510c09ff65c0c9976e123279d264aa4d14.tar.gz xmobar-6dd945510c09ff65c0c9976e123279d264aa4d14.tar.bz2 |
Unsafe versions of XPropertyLog and NamedXPropertyLog
Diffstat (limited to 'src')
-rw-r--r-- | src/Plugins/XMonadLog.hs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/Plugins/XMonadLog.hs b/src/Plugins/XMonadLog.hs index b424565..158b7ef 100644 --- a/src/Plugins/XMonadLog.hs +++ b/src/Plugins/XMonadLog.hs @@ -33,7 +33,9 @@ import Actions (stripActions) data XMonadLog = XMonadLog | UnsafeXMonadLog | XPropertyLog String + | UnsafeXPropertyLog String | NamedXPropertyLog String String + | UnsafeNamedXPropertyLog String String deriving (Read, Show) instance Exec XMonadLog where @@ -41,16 +43,22 @@ instance Exec XMonadLog where alias UnsafeXMonadLog = "UnsafeXMonadLog" alias (XPropertyLog atom) = atom alias (NamedXPropertyLog _ name) = name + alias (UnsafeXPropertyLog atom) = atom + alias (UnsafeNamedXPropertyLog _ name) = name start x cb = do let atom = case x of - XMonadLog -> "_XMONAD_LOG" - UnsafeXMonadLog -> "_XMONAD_LOG" - XPropertyLog a -> a + XMonadLog -> "_XMONAD_LOG" + UnsafeXMonadLog -> "_XMONAD_LOG" + XPropertyLog a -> a + UnsafeXPropertyLog a -> a NamedXPropertyLog a _ -> a + UnsafeNamedXPropertyLog a _ -> a sanitize = case x of - UnsafeXMonadLog -> id - _ -> stripActions + UnsafeXMonadLog -> id + UnsafeXPropertyLog _ -> id + UnsafeNamedXPropertyLog _ _ -> id + _ -> stripActions d <- openDisplay "" xlog <- internAtom d atom False |