From 426c931d5b0ebc6d53396c34ec38eb342be501c3 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 25 Nov 2018 07:35:54 +0000 Subject: Refactoring: Xmobar.Run --- src/lib/Xmobar/Config.hs | 52 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) (limited to 'src/lib/Xmobar/Config.hs') diff --git a/src/lib/Xmobar/Config.hs b/src/lib/Xmobar/Config.hs index 364ce17..c38bd6f 100644 --- a/src/lib/Xmobar/Config.hs +++ b/src/lib/Xmobar/Config.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE TypeOperators, CPP #-} - ----------------------------------------------------------------------------- -- | -- Module : Xmobar.Config @@ -20,36 +18,17 @@ module Xmobar.Config Config (..) , XPosition (..), Align (..), Border(..) , defaultConfig - , runnableTypes , getXdgConfigFile ) where -import System.Environment -import System.Directory (getHomeDirectory) -import System.FilePath (()) - -import Xmobar.Commands -import {-# SOURCE #-} Xmobar.Runnable -import Xmobar.Plugins.Monitors import Xmobar.Plugins.Date -import Xmobar.Plugins.PipeReader -import Xmobar.Plugins.BufferedPipeReader -import Xmobar.Plugins.MarqueePipeReader -import Xmobar.Plugins.CommandReader import Xmobar.Plugins.StdinReader -import Xmobar.Plugins.XMonadLog -import Xmobar.Plugins.EWMH -import Xmobar.Plugins.Kbd -import Xmobar.Plugins.Locks -#ifdef INOTIFY -import Xmobar.Plugins.Mail -import Xmobar.Plugins.MBox -#endif +import System.Environment +import System.Directory (getHomeDirectory) +import System.FilePath (()) -#ifdef DATEZONE -import Xmobar.Plugins.DateZone -#endif +import Xmobar.Run.Runnable (Runnable(..)) -- $config -- Configuration data type and default configuration @@ -150,29 +129,6 @@ defaultConfig = "%uname% * %theDate%" } - --- | An alias for tuple types that is more convenient for long lists. -type a :*: b = (a, b) -infixr :*: - --- | This is the list of types that can be hidden inside --- 'Runnable.Runnable', the existential type that stores all commands --- to be executed by Xmobar. It is used by 'Runnable.readRunnable' in --- the 'Runnable.Runnable' Read instance. To install a plugin just add --- the plugin's type to the list of types (separated by ':*:') appearing in --- this function's type signature. -runnableTypes :: Command :*: Monitors :*: Date :*: PipeReader :*: - BufferedPipeReader :*: CommandReader :*: StdinReader :*: - XMonadLog :*: EWMH :*: Kbd :*: Locks :*: -#ifdef INOTIFY - Mail :*: MBox :*: -#endif -#ifdef DATEZONE - DateZone :*: -#endif - MarqueePipeReader :*: () -runnableTypes = undefined - xdgConfigDir :: IO String xdgConfigDir = do env <- getEnvironment case lookup "XDG_CONFIG_HOME" env of -- cgit v1.2.3