From 48722f79a4b964cad2221d14965a843cc36c70e6 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Mon, 26 Dec 2022 09:15:49 -0500 Subject: [PATCH] ENH add option to only test the dependency tree and spit out results --- bin/xmobar.hs | 3 +++ bin/xmonad.hs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/bin/xmobar.hs b/bin/xmobar.hs index 31960f4..b269565 100644 --- a/bin/xmobar.hs +++ b/bin/xmobar.hs @@ -11,6 +11,8 @@ module Main (main) where -- * Theme integration with xmonad (shared module imported below) -- * A custom Locks plugin from my own forked repo +import Control.Monad + import Data.Internal.DBus import Data.Internal.Dependency import Data.List @@ -52,6 +54,7 @@ main = getArgs >>= parse parse :: [String] -> IO () parse [] = run parse ["--deps"] = withCache printDeps +parse ["--test"] = void $ withCache . evalConfig =<< connectDBus parse _ = usage run :: IO () diff --git a/bin/xmonad.hs b/bin/xmonad.hs index 6387878..f1f837e 100644 --- a/bin/xmonad.hs +++ b/bin/xmonad.hs @@ -71,8 +71,10 @@ main = getArgs >>= parse parse :: [String] -> IO () parse [] = run parse ["--deps"] = withCache printDeps +parse ["--test"] = void $ withCache . evalConf =<< connectDBusX parse _ = usage + run :: IO () run = do db <- connectDBusX