summaryrefslogtreecommitdiffhomepage
path: root/src/lib/Xmobar/Config.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2018-11-25 07:35:54 +0000
committerjao <jao@gnu.org>2018-11-25 07:35:54 +0000
commit426c931d5b0ebc6d53396c34ec38eb342be501c3 (patch)
tree85ee8fc4b09384017b52a4822b61ebceffb8e95b /src/lib/Xmobar/Config.hs
parentc763954685fd3f4d8998cd26cb4b9625fe6cb8e6 (diff)
downloadxmobar-426c931d5b0ebc6d53396c34ec38eb342be501c3.tar.gz
xmobar-426c931d5b0ebc6d53396c34ec38eb342be501c3.tar.bz2
Refactoring: Xmobar.Run
Diffstat (limited to 'src/lib/Xmobar/Config.hs')
-rw-r--r--src/lib/Xmobar/Config.hs52
1 files changed, 4 insertions, 48 deletions
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 =
"<fc=#00FF00>%uname%</fc> * <fc=#FF0000>%theDate%</fc>"
}
-
--- | 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