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
- readXDGMenu :: Maybe String -> IO (Maybe (XDGMenu, [DesktopEntry]))
- matchesCondition :: DesktopEntry -> DesktopEntryCondition -> Bool
- getXDGDesktop :: IO String
- getDirectoryDirs :: IO [FilePath]
- getApplicationEntries :: [String] -> XDGMenu -> IO [DesktopEntry]
- getPreferredLanguages :: IO [String]
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 # |
readXDGMenu :: Maybe String -> IO (Maybe (XDGMenu, [DesktopEntry])) Source #
Fetch menus and desktop entries and assemble the XDG menu.
matchesCondition :: DesktopEntry -> DesktopEntryCondition -> Bool Source #
Determine whether a desktop entry fulfils a condition.
getXDGDesktop :: IO String Source #
Determine current Desktop
getDirectoryDirs :: IO [FilePath] Source #
Return desktop directories
getApplicationEntries Source #
:: [String] | Preferred languages |
-> XDGMenu | |
-> IO [DesktopEntry] |
Return a list of all available desktop entries for a given xdg menu.
getPreferredLanguages :: IO [String] Source #
Determine locale language settings