| Copyright | 2017 Ulf Jasper |
|---|---|
| License | BSD3-style (see LICENSE) |
| Maintainer | Ulf Jasper <ulf.jasper@web.de> |
| Stability | unstable |
| Portability | unportable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
System.Taffybar.Widget.XDGMenu.MenuWidget
Contents
Description
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 :: MonadIO m => Maybe String -> m 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 variables XDG_CONFIG_HOME and XDG_CONFIG_DIRS. (If XDG_CONFIG_HOME is not set or empty then $HOME/.config is used, if XDG_CONFIG_DIRS is not set or empty then "etcxdg" is used). 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.