REF fix action key name

This commit is contained in:
Nathan Dwarshuis 2021-11-21 23:56:27 -05:00
parent 866d2cbb75
commit c03f1938a1
5 changed files with 17 additions and 17 deletions

View File

@ -283,7 +283,7 @@ rightPlugins sysClient sesClient = mapM evalFeature
getWireless :: BarFeature
getWireless = Feature
{ ftrMaybeAction = Chain wirelessCmd $ readInterface isWireless
{ ftrAction = Chain wirelessCmd $ readInterface isWireless
, ftrName = "wireless status indicator"
, ftrWarning = Default
}
@ -291,7 +291,7 @@ getWireless = Feature
-- TODO this needs a dbus interface
getEthernet :: BarFeature
getEthernet = Feature
{ ftrMaybeAction = Chain ethernetCmd (readInterface isEthernet)
{ ftrAction = Chain ethernetCmd (readInterface isEthernet)
, ftrName = "ethernet status indicator"
, ftrWarning = Default
}
@ -303,7 +303,7 @@ getEthernet = Feature
getBattery :: BarFeature
getBattery = Feature
{ ftrMaybeAction = Parent batteryCmd [IOTest hasBattery]
{ ftrAction = Parent batteryCmd [IOTest hasBattery]
, ftrName = "battery level indicator"
, ftrWarning = Default
}
@ -312,7 +312,7 @@ type BarFeature = Feature CmdSpec
getVPN :: Maybe Client -> BarFeature
getVPN client = Feature
{ ftrMaybeAction = DBusEndpoint_ (const vpnCmd) client [ep] [dp]
{ ftrAction = DBusEndpoint_ (const vpnCmd) client [ep] [dp]
, ftrName = "VPN status indicator"
, ftrWarning = Default
}
@ -322,7 +322,7 @@ getVPN client = Feature
getBt :: Maybe Client -> BarFeature
getBt client = Feature
{ ftrMaybeAction = DBusEndpoint_ (const btCmd) client [ep] []
{ ftrAction = DBusEndpoint_ (const btCmd) client [ep] []
, ftrName = "bluetooth status indicator"
, ftrWarning = Default
}
@ -331,28 +331,28 @@ getBt client = Feature
getAlsa :: BarFeature
getAlsa = Feature
{ ftrMaybeAction = Parent alsaCmd [Executable "alsactl"]
{ ftrAction = Parent alsaCmd [Executable "alsactl"]
, ftrName = "volume level indicator"
, ftrWarning = Default
}
getBl :: Maybe Client -> BarFeature
getBl client = Feature
{ ftrMaybeAction = DBusEndpoint_ (const blCmd) client [intelBacklightSignalDep] []
{ ftrAction = DBusEndpoint_ (const blCmd) client [intelBacklightSignalDep] []
, ftrName = "Intel backlight indicator"
, ftrWarning = Default
}
getCk :: Maybe Client -> BarFeature
getCk client = Feature
{ ftrMaybeAction = DBusEndpoint_ (const ckCmd) client [clevoKeyboardSignalDep] []
{ ftrAction = DBusEndpoint_ (const ckCmd) client [clevoKeyboardSignalDep] []
, ftrName = "Clevo keyboard indicator"
, ftrWarning = Default
}
getSs :: Maybe Client -> BarFeature
getSs client = Feature
{ ftrMaybeAction = DBusEndpoint_ (const ssCmd) client [ssSignalDep] []
{ ftrAction = DBusEndpoint_ (const ssCmd) client [ssSignalDep] []
, ftrName = "screensaver indicator"
, ftrWarning = Default
}

View File

@ -90,7 +90,7 @@ listenDevices = do
runRemovableMon :: Maybe Client -> FeatureIO
runRemovableMon client = Feature
{ ftrMaybeAction = DBusEndpoint_ (const listenDevices) client [addedDep, removedDep] []
{ ftrAction = DBusEndpoint_ (const listenDevices) client [addedDep, removedDep] []
, ftrName = "removeable device monitor"
, ftrWarning = Default
}

View File

@ -91,7 +91,7 @@ matchSignal BrightnessConfig { bcPath = p, bcInterface = i } cb = do
brightnessExporter :: RealFrac b => [Dependency] -> BrightnessConfig a b
-> Maybe Client -> FeatureIO
brightnessExporter deps bc@BrightnessConfig { bcName = n } client = Feature
{ ftrMaybeAction = DBusBus_ (exportBrightnessControls' bc) xmonadBusName client deps
{ ftrAction = DBusBus_ (exportBrightnessControls' bc) xmonadBusName client deps
, ftrName = n ++ " exporter"
, ftrWarning = Default
}

View File

@ -95,7 +95,7 @@ bodyGetCurrentState _ = Nothing
exportScreensaver :: Maybe Client -> FeatureIO
exportScreensaver client = Feature
{ ftrMaybeAction = DBusBus_ cmd xmonadBusName client [Executable ssExecutable]
{ ftrAction = DBusBus_ cmd xmonadBusName client [Executable ssExecutable]
, ftrName = "screensaver interface"
, ftrWarning = Default
}

View File

@ -71,7 +71,7 @@ import XMonad.Internal.Shell
-- robust anyways, at the cost of being a bit slower.
data Feature a = Feature
{ ftrMaybeAction :: Action a
{ ftrAction :: Action a
, ftrName :: String
, ftrWarning :: Warning
}
@ -102,11 +102,11 @@ ioFeature Feature {..} =
-- HACK just doing a normal record update here will make GHC complain about
-- an 'insufficiently polymorphic record update' ...I guess because my
-- GADT isn't polymorphic enough (which is obviously BS)
Feature {ftrMaybeAction = liftIO <$> ftrMaybeAction, ..}
Feature {ftrAction = liftIO <$> ftrAction, ..}
featureDefault :: String -> [Dependency] -> a -> Feature a
featureDefault n ds x = Feature
{ ftrMaybeAction = Parent x ds
{ ftrAction = Parent x ds
, ftrName = n
, ftrWarning = Default
}
@ -121,7 +121,7 @@ featureExeArgs n cmd args =
featureEndpoint :: BusName -> ObjectPath -> InterfaceName -> MemberName
-> Maybe Client -> FeatureIO
featureEndpoint busname path iface mem client = Feature
{ ftrMaybeAction = DBusEndpoint_ cmd client deps []
{ ftrAction = DBusEndpoint_ cmd client deps []
, ftrName = "screensaver toggle"
, ftrWarning = Default
}
@ -169,7 +169,7 @@ evalAction (DBusBus_ action busname (Just client) deps) = do
evalFeature :: Feature a -> IO (MaybeAction a)
evalFeature (ConstFeature x) = return $ Right x
evalFeature Feature
{ ftrMaybeAction = a
{ ftrAction = a
, ftrName = n
, ftrWarning = w
} = do