| 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 | 
System.Taffybar.Information.XDG.DesktopEntry
Description
Implementation of version 1.1 of the freedesktop "Desktop Entry specification", see https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.2.html.
Synopsis
- data DesktopEntry = DesktopEntry {- deType :: DesktopEntryType
- deFilename :: FilePath
- deAttributes :: [(String, String)]
 
- deCommand :: DesktopEntry -> Maybe String
- deComment :: [String] -> DesktopEntry -> Maybe String
- deHasCategory :: DesktopEntry -> String -> Bool
- deIcon :: DesktopEntry -> Maybe String
- deName :: [String] -> DesktopEntry -> String
- deNoDisplay :: DesktopEntry -> Bool
- deNotShowIn :: DesktopEntry -> [String]
- deOnlyShowIn :: DesktopEntry -> [String]
- existingDirs :: [FilePath] -> IO [FilePath]
- getDefaultConfigHome :: IO FilePath
- getDirectoryEntriesDefault :: IO [DesktopEntry]
- getDirectoryEntry :: [FilePath] -> String -> IO (Maybe DesktopEntry)
- getDirectoryEntryDefault :: String -> IO (Maybe DesktopEntry)
- getXDGDataDirs :: IO [FilePath]
- listDesktopEntries :: String -> FilePath -> IO [DesktopEntry]
Documentation
data DesktopEntry Source #
Desktop Entry. All attributes (key-value-pairs) are stored in an association list.
Constructors
| DesktopEntry | |
| Fields 
 | |
Instances
| Eq DesktopEntry Source # | |
| Defined in System.Taffybar.Information.XDG.DesktopEntry | |
| Read DesktopEntry Source # | |
| Defined in System.Taffybar.Information.XDG.DesktopEntry Methods readsPrec :: Int -> ReadS DesktopEntry # readList :: ReadS [DesktopEntry] # | |
| Show DesktopEntry Source # | |
| Defined in System.Taffybar.Information.XDG.DesktopEntry Methods showsPrec :: Int -> DesktopEntry -> ShowS # show :: DesktopEntry -> String # showList :: [DesktopEntry] -> ShowS # | |
deCommand :: DesktopEntry -> Maybe String Source #
Return the command defined by the given desktop entry. TODO: should check the dbus thing. TODO: are there "field codes", i.e. %char things, that
Arguments
| :: [String] | Preferred languages | 
| -> DesktopEntry | |
| -> Maybe String | 
Return the proper comment of the desktop entry, depending on the list of preferred languages.
Arguments
| :: DesktopEntry | desktop entry | 
| -> String | category to be checked | 
| -> Bool | 
Determine whether the Category attribute of a desktop entry contains a given value.
Arguments
| :: [String] | Preferred languages | 
| -> DesktopEntry | |
| -> String | 
Return the proper name of the desktop entry, depending on the list of preferred languages.
deNoDisplay :: DesktopEntry -> Bool Source #
Return True if the entry must not be displayed
deNotShowIn :: DesktopEntry -> [String] Source #
Return the categories in which the entry shall not be shown
deOnlyShowIn :: DesktopEntry -> [String] Source #
Return the categories in which the entry shall be shown
getDirectoryEntry :: [FilePath] -> String -> IO (Maybe DesktopEntry) Source #
Retrieve a desktop entry with a specific name.
getDirectoryEntryDefault :: String -> IO (Maybe DesktopEntry) Source #
getXDGDataDirs :: IO [FilePath] Source #
Arguments
| :: String | The extension to use in the search | 
| -> FilePath | The filepath at which to search | 
| -> IO [DesktopEntry] | 
Return a list of all desktop entries in the given directory.