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

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

Description

Implementation of version 1.1 of the freedesktop "Desktop Menu Specification", see https://specifications.freedesktop.org/menu-spec/menu-spec-1.1.html

See also `MenuWidget`.

Synopsis

- data Menu = Menu {
  - fmName :: String
  - fmComment :: String
  - fmIcon :: Maybe String
  - fmSubmenus :: [Menu]
  - fmEntries :: [MenuEntry]
  - fmOnlyUnallocated :: Bool
  }
- data MenuEntry = MenuEntry {
  - feName :: Text
  - feComment :: Text
  - feCommand :: String
  - feIcon :: Maybe Text
  }
- buildMenu :: Maybe String -> IO Menu
- getApplicationEntries :: [String] -> XDGMenu -> IO [DesktopEntry]

# Documentation

data Menu Source #

Displayable menu

Constructors

Menu |

Fields

- fmName :: String
- fmComment :: String
- fmIcon :: Maybe String
- fmSubmenus :: [Menu]
- fmEntries :: [MenuEntry]
- fmOnlyUnallocated :: Bool

#### Instances

Instances details

Show Menu Source # |
Instance details Defined in System.Taffybar.Widget.XDGMenu.Menu Methods showsPrec :: Int -> Menu -> ShowS Source # show :: Menu -> String Source # showList :: [Menu] -> ShowS Source #
Eq Menu Source # |
Instance details Defined in System.Taffybar.Widget.XDGMenu.Menu Methods (==) :: Menu -> Menu -> Bool Source # (/=) :: Menu -> Menu -> Bool Source #

data MenuEntry Source #

Displayable menu entry

Constructors

MenuEntry |

Fields

- feName :: Text
- feComment :: Text
- feCommand :: String
- feIcon :: Maybe Text

#### Instances

Instances details

Show MenuEntry Source # |
Instance details Defined in System.Taffybar.Widget.XDGMenu.Menu Methods showsPrec :: Int -> MenuEntry -> ShowS Source # show :: MenuEntry -> String Source # showList :: [MenuEntry] -> ShowS Source #
Eq MenuEntry Source # |
Instance details Defined in System.Taffybar.Widget.XDGMenu.Menu Methods (==) :: MenuEntry -> MenuEntry -> Bool Source # (/=) :: MenuEntry -> MenuEntry -> Bool Source #

buildMenu :: Maybe String -> IO Menu Source #

Fetch menus and desktop entries and assemble the menu.

getApplicationEntries Source #

Arguments

:: [String] | Preferred languages
-> XDGMenu |
-> IO [DesktopEntry] |

Return a list of all available desktop entries for a given xdg menu.