From 543858c95e42900d6638cab4c76997b2841842b8 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Fri, 19 Nov 2021 22:14:25 -0500 Subject: [PATCH] ENH remove useless default key --- bin/xmobar.hs | 6 ------ lib/XMonad/Internal/Command/Desktop.hs | 1 - lib/XMonad/Internal/DBus/Brightness/Common.hs | 2 -- lib/XMonad/Internal/DBus/Screensaver.hs | 2 -- lib/XMonad/Internal/Dependency.hs | 2 -- 5 files changed, 13 deletions(-) diff --git a/bin/xmobar.hs b/bin/xmobar.hs index 815c966..a202e97 100644 --- a/bin/xmobar.hs +++ b/bin/xmobar.hs @@ -314,7 +314,6 @@ getBattery :: BarFeature getBattery = Feature { ftrAction = batteryCmd , ftrSilent = False - , ftrDefault = Nothing , ftrChildren = [Dependency $ IOTest hasBattery] } @@ -324,7 +323,6 @@ getVPN :: BarFeature getVPN = Feature { ftrAction = vpnCmd , ftrSilent = False - , ftrDefault = Nothing , ftrChildren = [d, v] } where @@ -335,7 +333,6 @@ getBt :: BarFeature getBt = Feature { ftrAction = btCmd , ftrSilent = False - , ftrDefault = Nothing , ftrChildren = [dep] } where @@ -344,7 +341,6 @@ getBt = Feature getAlsa :: BarFeature getAlsa = Feature { ftrAction = alsaCmd - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = [exe "alsactl"] } @@ -352,7 +348,6 @@ getAlsa = Feature getBl :: BarFeature getBl = Feature { ftrAction = blCmd - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = [curFileDep, maxFileDep] } @@ -360,7 +355,6 @@ getBl = Feature getSs :: BarFeature getSs = Feature { ftrAction = ssCmd - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = [ssDep] } diff --git a/lib/XMonad/Internal/Command/Desktop.hs b/lib/XMonad/Internal/Command/Desktop.hs index df2a55d..6ff52f5 100644 --- a/lib/XMonad/Internal/Command/Desktop.hs +++ b/lib/XMonad/Internal/Command/Desktop.hs @@ -96,7 +96,6 @@ runTMux :: IO MaybeX runTMux = evalFeature $ Feature { ftrAction = cmd , ftrSilent = False - , ftrDefault = Nothing , ftrChildren = [exe myTerm, exe "tmux", exe "bash"] } where diff --git a/lib/XMonad/Internal/DBus/Brightness/Common.hs b/lib/XMonad/Internal/DBus/Brightness/Common.hs index 35adade..769f78d 100644 --- a/lib/XMonad/Internal/DBus/Brightness/Common.hs +++ b/lib/XMonad/Internal/DBus/Brightness/Common.hs @@ -102,7 +102,6 @@ brightnessExporter :: RealFrac b => [Dependency (IO ())] -> BrightnessConfig a b -> Client -> Feature (IO ()) (IO ()) brightnessExporter deps bc client = Feature { ftrAction = exportBrightnessControls' bc client - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = deps } @@ -138,7 +137,6 @@ callBacklight :: BrightnessConfig a b -> Feature (IO ()) (IO ()) -> MemberName callBacklight BrightnessConfig { bcPath = p, bcInterface = i } exporter mem = Feature { ftrAction = void $ callMethod $ methodCall p i mem - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = [SubFeature exporter] } diff --git a/lib/XMonad/Internal/DBus/Screensaver.hs b/lib/XMonad/Internal/DBus/Screensaver.hs index f471133..431c589 100644 --- a/lib/XMonad/Internal/DBus/Screensaver.hs +++ b/lib/XMonad/Internal/DBus/Screensaver.hs @@ -109,7 +109,6 @@ exportScreensaver client = initControls client exportScreensaver' controls exportScreensaver' :: Client -> Feature (IO ()) (IO ()) exportScreensaver' client = Feature { ftrAction = cmd - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = [ssDep] } @@ -125,7 +124,6 @@ exportScreensaver' client = Feature callToggle :: Feature (IO ()) (IO ()) -> Feature (IO ()) (IO ()) callToggle exporter = Feature { ftrAction = cmd - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = [SubFeature exporter] } diff --git a/lib/XMonad/Internal/Dependency.hs b/lib/XMonad/Internal/Dependency.hs index 8a49d7f..8585ecb 100644 --- a/lib/XMonad/Internal/Dependency.hs +++ b/lib/XMonad/Internal/Dependency.hs @@ -82,7 +82,6 @@ data Dependency a = SubFeature (Feature a a) data Feature a b = Feature { ftrAction :: a - , ftrDefault :: Maybe a , ftrSilent :: Bool , ftrChildren :: [Dependency b] } | ConstFeature a @@ -261,7 +260,6 @@ runIfInstalled :: [Dependency a] -> b -> IO (MaybeExe b) runIfInstalled ds x = evalFeature $ Feature { ftrAction = x - , ftrDefault = Nothing , ftrSilent = False , ftrChildren = ds }