Permalink
Browse files

Merge pull request #8 from u-quark/master

Added support for the new DBus library namely dbus-0.10
  • Loading branch information...
2 parents 1100898 + 16fc7d2 commit f24239e168be1bd77de92dd9f997c23c79f0e669 @alexkay committed Jul 26, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 xmonad.hs
View
@@ -4,7 +4,8 @@ import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog
-import qualified DBus.Client.Simple as D
+import qualified DBus as D
+import qualified DBus.Client as D
import qualified Codec.Binary.UTF8.String as UTF8
main :: IO ()
@@ -30,15 +31,15 @@ prettyPrinter dbus = defaultPP
getWellKnownName :: D.Client -> IO ()
getWellKnownName dbus = do
D.requestName dbus (D.busName_ "org.xmonad.Log")
- [D.AllowReplacement, D.ReplaceExisting, D.DoNotQueue]
+ [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
return ()
dbusOutput :: D.Client -> String -> IO ()
-dbusOutput dbus str = D.emit dbus
- "/org/xmonad/Log"
- "org.xmonad.Log"
- "Update"
- [D.toVariant ("<b>" ++ (UTF8.decodeString str) ++ "</b>")]
+dbusOutput dbus str = do
+ let signal = (D.signal "/org/xmonad/Log" "org.xmonad.Log" "Update") {
+ D.signalBody = [D.toVariant ("<b>" ++ (UTF8.decodeString str) ++ "</b>")]
+ }
+ D.emit dbus signal
pangoColor :: String -> String -> String
pangoColor fg = wrap left right

0 comments on commit f24239e

Please sign in to comment.