taffybar-1.0.1: A desktop bar similar to xmobar, but with more GUI

Copyright2017 Ulf Jasper
LicenseBSD3-style (see LICENSE)
MaintainerUlf Jasper <ulf.jasper@web.de>
Stabilityunstable
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

System.Taffybar.Menu.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

Usage

In order to use this widget add the following line to your taffybar.hs file:

import System.Taffybar.Menu.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.

menuWidgetNew Source #

Arguments

:: Maybe String

menu name, must end with a dash, e.g. "mate-" or "gnome-"

-> IO Widget 

Create a new XDG Menu Widget.