You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
synopsis="Miscellaneous utilities for building and working with command line interfaces";
22
+
description="Convenience functions for writing command line interfaces, providing facilities for logging, process management, and printing to the terminal.";
synopsis="A client library for the D-Bus IPC system.";
22
+
description="D-Bus is a simple, message-based protocol for inter-process\ncommunication, which allows applications to interact with other parts of\nthe machine and the user's session using remote procedure calls.\n\nD-Bus is a essential part of the modern Linux desktop, where it replaces\nearlier protocols such as CORBA and DCOP.\n\nThis library is an implementation of the D-Bus protocol in Haskell. It\ncan be used to add D-Bus support to Haskell applications, without the\nawkward interfaces common to foreign bindings.\n\nExample: connect to the session bus, and get a list of active names.\n\n@\n{-\\# LANGUAGE OverloadedStrings \\#-}\n\nimport Data.List (sort)\nimport DBus\nimport DBus.Client\n\nmain = do\n  client <- connectSession\n \n  -- Request a list of connected clients from the bus\n  reply <- call_ client (methodCall \\\"\\/org\\/freedesktop\\/DBus\\\"\\\"org.freedesktop.DBus\\\"\\\"ListNames\\\")\n  { methodCallDestination = Just \\\"org.freedesktop.DBus\\\"\n  }\n \n  -- org.freedesktop.DBus.ListNames() returns a single value, which is\n  -- a list of names (here represented as [String])\n  let Just names = fromVariant (methodReturnBody reply !! 0)\n \n  -- Print each name on a line, sorted so reserved names are below\n  -- temporary names.\n  mapM_ putStrLn (sort names)\n@\n\n>$ ghc --make list-names.hs\n>$ ./list-names\n>:1.0\n>:1.1\n>:1.10\n>:1.106\n>:1.109\n>:1.110\n>ca.desrt.dconf\n>org.freedesktop.DBus\n>org.freedesktop.Notifications\n>org.freedesktop.secrets\n>org.gnome.ScreenSaver";
0 commit comments