From 20a5f616bd4c8c3acc78bc64f20832ca4784b5c7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 5 Jul 2017 16:26:30 -0400 Subject: less wonky (and working) implementation of defaultPanelFor --- src/Propellor/Property/XFCE.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') 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) -- cgit v1.2.3