Copyright | 2017 Ulf Jasper |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | Ulf Jasper <ulf.jasper@web.de> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
MenuWidget provides a hierachical GTK menu containing all applicable desktop entries found on the system. The menu is built according to the version 1.1 of the XDG "Desktop Menu Specification", see https://specifications.freedesktop.org/menu-spec/menu-spec-1.1.html
Synopsis
- menuWidgetNew :: Maybe String -> IO Widget
Usage
In order to use this widget add the following line to your
taffybar.hs
file:
import System.Taffybar.Widget.XDGMenu.MenuWidget main = do let menu = menuWidgetNew $ Just "PREFIX-"
The menu will look for a file named "PREFIX-applications.menu" in the (subdirectory "menus" of the) directories specified by the environment variable XDG_CONFIG_DIRS and "etcxdg". If no prefix is given (i.e. if you pass Nothing) then the value of the environment variable XDG_MENU_PREFIX is used, if it is set. If taffybar is running inside a desktop environment like Mate, Gnome, XFCE etc. the environment variables XDG_CONFIG_DIRS and XDG_MENU_PREFIX should be set and you may create the menu like this:
let menu = menuWidgetNew Nothing
Now you can use menu
as any other Taffybar widget.