summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2017-07-05 16:26:30 -0400
committerJoey Hess2017-07-05 16:26:30 -0400
commit20a5f616bd4c8c3acc78bc64f20832ca4784b5c7 (patch)
tree63d5ba44a57af99bfa47fa169876d5db9a6f6821 /src
parent1428b1f276a65a3a3c5a881905458df8fe0e6f62 (diff)
less wonky (and working) implementation of defaultPanelFor
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/XFCE.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Propellor/Property/XFCE.hs b/src/Propellor/Property/XFCE.hs
index 4f3a152a..e3dd060e 100644
--- a/src/Propellor/Property/XFCE.hs
+++ b/src/Propellor/Property/XFCE.hs
@@ -1,7 +1,6 @@
module Propellor.Property.XFCE where
import Propellor.Base
-import Propellor.Types.Core (getSatisfy)
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.File as File
import qualified Propellor.Property.User as User
@@ -22,10 +21,11 @@ installedMin = Apt.installedMin ["xfce4", "xfce4-terminal", "task-desktop"]
-- If the user subsequently modifies their panel, their modifications will
-- not be overwritten by this property.
defaultPanelFor :: User -> Property DebianLike
-defaultPanelFor u@(User username) = adjustPropertySatisfy baseprop $ \s -> do
+defaultPanelFor u@(User username) = property' desc $ \w -> do
home <- liftIO $ User.homedir u
- s <> fromMaybe mempty (getSatisfy (go home))
+ ensureProperty w (go home)
where
+ desc = "default XFCE panel for " ++ username
cf = ".config" </> "xfce4" </> "xfconf"
</> "xfce-perchannel-xml" </> "xfce4-panel.xml"
-- This location is probably Debian-specific.
@@ -36,5 +36,3 @@ defaultPanelFor u@(User username) = adjustPropertySatisfy baseprop $ \s -> do
`before` File.applyPath home cf
(\f -> File.ownerGroup f u (userGroup u))
`requires` Apt.installed ["xfce4-panel"]
- baseprop :: Property DebianLike
- baseprop = doNothing `describe` ("default XFCE panel for " ++ username)