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 |
Implementation of version 1.1 of the XDG "Desktop Menu Specification", see https://specifications.freedesktop.org/menu-spec/menu-spec-1.1.html
Synopsis
- data XDGMenu = XDGMenu {
- xmAppDir :: Maybe String
- xmDefaultAppDirs :: Bool
- xmDirectoryDir :: Maybe String
- xmDefaultDirectoryDirs :: Bool
- xmLegacyDirs :: [String]
- xmName :: String
- xmDirectory :: String
- xmOnlyUnallocated :: Bool
- xmDeleted :: Bool
- xmInclude :: Maybe DesktopEntryCondition
- xmExclude :: Maybe DesktopEntryCondition
- xmSubmenus :: [XDGMenu]
- xmLayout :: [XDGLayoutItem]
- data DesktopEntryCondition
- getApplicationEntries :: [String] -> XDGMenu -> IO [DesktopEntry]
- getDirectoryDirs :: IO [FilePath]
- getPreferredLanguages :: IO [String]
- getXDGDesktop :: IO String
- getXDGMenuFilenames :: Maybe String -> IO [FilePath]
- matchesCondition :: DesktopEntry -> DesktopEntryCondition -> Bool
- readXDGMenu :: Maybe String -> IO (Maybe (XDGMenu, [DesktopEntry]))
Documentation
XDG Menu, cf. "Desktop Menu Specification".
XDGMenu | |
|
data DesktopEntryCondition Source #
Combinable conditions for Include and Exclude statements.
Category String | |
Filename String | |
Not DesktopEntryCondition | |
And [DesktopEntryCondition] | |
Or [DesktopEntryCondition] | |
All | |
None |
Instances
Eq DesktopEntryCondition Source # | |
Defined in System.Taffybar.Information.XDG.Protocol (==) :: DesktopEntryCondition -> DesktopEntryCondition -> Bool # (/=) :: DesktopEntryCondition -> DesktopEntryCondition -> Bool # | |
Read DesktopEntryCondition Source # | |
Show DesktopEntryCondition Source # | |
Defined in System.Taffybar.Information.XDG.Protocol showsPrec :: Int -> DesktopEntryCondition -> ShowS # show :: DesktopEntryCondition -> String # showList :: [DesktopEntryCondition] -> ShowS # |
getApplicationEntries Source #
:: [String] | Preferred languages |
-> XDGMenu | |
-> IO [DesktopEntry] |
Return a list of all available desktop entries for a given xdg menu.
getDirectoryDirs :: IO [FilePath] Source #
Return desktop directories
getPreferredLanguages :: IO [String] Source #
Determine locale language settings
getXDGDesktop :: IO String Source #
Determine current Desktop
:: Maybe String | Overrides the value of the environment variable XDG_MENU_PREFIX. Specifies the prefix for the menu (e.g. 'Just "mate-"'). |
-> IO [FilePath] |
Find filename(s) of the application menu(s).
matchesCondition :: DesktopEntry -> DesktopEntryCondition -> Bool Source #
Determine whether a desktop entry fulfils a condition.
readXDGMenu :: Maybe String -> IO (Maybe (XDGMenu, [DesktopEntry])) Source #
Fetch menus and desktop entries and assemble the XDG menu.