module Propellor.Property.FreeDesktop where
import Propellor.Base
import Propellor.Property.ConfFile
desktopFile :: String -> FilePath
desktopFile :: String -> String
desktopFile String
s = String
s forall a. [a] -> [a] -> [a]
++ String
".desktop"
type Name = String
type Exec = String
autostart :: FilePath -> Name -> Exec -> RevertableProperty UnixLike UnixLike
autostart :: String -> String -> String -> RevertableProperty UnixLike UnixLike
autostart String
f String
n String
e = (String
"/etc/xdg/autostart" String -> String -> String
</> String
f) String
-> [(String, [(String, String)])]
-> RevertableProperty UnixLike UnixLike
`iniFileContains`
[ (String
"Desktop Entry",
[ (String
"Type", String
"Application")
, (String
"Version", String
"1.0")
, (String
"Name", String
n)
, (String
"Comment", String
"Autostart")
, (String
"Terminal", String
"False")
, (String
"Exec", String
e)
] )
]