diff options
author | Joey Hess <joey@kitenet.net> | 2013-07-09 20:16:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-07-09 20:16:07 -0400 |
commit | d8ac02c206d8a94f222031ef13e1337dcb9c542e (patch) | |
tree | b01a723336af0c7a21203a76cf1ec16588ccbf75 /Utility/FreeDesktop.hs | |
parent | ffb8a2d9d6140fb50d9d3553be923b0b8f5cffed (diff) |
install to ~/.local/icons, not ~/icons
Apparently the Icon Theme Specification no longer matches reality,
as implemented by XFCE and xdg-icon-resource.
Diffstat (limited to 'Utility/FreeDesktop.hs')
-rw-r--r-- | Utility/FreeDesktop.hs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Utility/FreeDesktop.hs b/Utility/FreeDesktop.hs index 6338948d2..9ed92a77b 100644 --- a/Utility/FreeDesktop.hs +++ b/Utility/FreeDesktop.hs @@ -93,16 +93,13 @@ autoStartPath :: String -> FilePath -> FilePath autoStartPath basename configdir = configdir </> "autostart" </> desktopfile basename -{- Path to use for an icon file. +{- Path to use for an icon file, in either the systemDataDir + - or the userDatadir. + - - The resolution is something like "48x48" or "scalable". -} -iconFilePath :: FilePath -> String -> Bool -> IO FilePath -iconFilePath file resolution systemwide - | systemwide = return $ systemDataDir </> "icons" </> subpath - | otherwise = do - home <- myHomeDir - return $ home </> ".icons" </> subpath - where - subpath = "hicolor" </> resolution </> "apps" </> file +iconFilePath :: FilePath -> String -> FilePath -> FilePath +iconFilePath file resolution datadir = datadir </> "icons" </> + "hicolor" </> resolution </> "apps" </> file desktopfile :: FilePath -> FilePath desktopfile f = f ++ ".desktop" |