summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-02-03 23:52:42 +0000
committerjao <jao@gnu.org>2022-02-03 23:52:42 +0000
commit76557c53f60bab75459db03e29c50f5d6ae55309 (patch)
treed18646b0daf454bd7584bfbc94842c234ced3a51 /src
parent2e3aafa375321176bfdabffcdf78cbdc30f8d67e (diff)
downloadxmobar-76557c53f60bab75459db03e29c50f5d6ae55309.tar.gz
xmobar-76557c53f60bab75459db03e29c50f5d6ae55309.tar.bz2
Xmobar.X11.Actions -> Xmobar.Run.Actions
Diffstat (limited to 'src')
-rw-r--r--src/Xmobar/App/X11EventLoop.hs2
-rw-r--r--src/Xmobar/Plugins/StdinReader.hs2
-rw-r--r--src/Xmobar/Plugins/XMonadLog.hs4
-rw-r--r--src/Xmobar/Run/Actions.hs (renamed from src/Xmobar/X11/Actions.hs)8
-rw-r--r--src/Xmobar/X11/Bitmap.hs4
-rw-r--r--src/Xmobar/X11/Draw.hs2
-rw-r--r--src/Xmobar/X11/Parsers.hs3
7 files changed, 14 insertions, 11 deletions
diff --git a/src/Xmobar/App/X11EventLoop.hs b/src/Xmobar/App/X11EventLoop.hs
index 7021b21..b8897b5 100644
--- a/src/Xmobar/App/X11EventLoop.hs
+++ b/src/Xmobar/App/X11EventLoop.hs
@@ -50,7 +50,7 @@ import Xmobar.Config.Types ( persistent
, Align(..)
, XPosition(..))
-import Xmobar.X11.Actions
+import Xmobar.Run.Actions
import Xmobar.X11.Parsers
import Xmobar.X11.Window
import Xmobar.X11.Text
diff --git a/src/Xmobar/Plugins/StdinReader.hs b/src/Xmobar/Plugins/StdinReader.hs
index c1e2724..76e102c 100644
--- a/src/Xmobar/Plugins/StdinReader.hs
+++ b/src/Xmobar/Plugins/StdinReader.hs
@@ -26,7 +26,7 @@ import System.Exit
import System.IO
import System.IO.Error (isEOFError)
import Xmobar.Run.Exec
-import Xmobar.X11.Actions (stripActions)
+import Xmobar.Run.Actions (stripActions)
import Control.Exception
import Control.Monad (forever)
diff --git a/src/Xmobar/Plugins/XMonadLog.hs b/src/Xmobar/Plugins/XMonadLog.hs
index 0bf62e1..4efd585 100644
--- a/src/Xmobar/Plugins/XMonadLog.hs
+++ b/src/Xmobar/Plugins/XMonadLog.hs
@@ -21,14 +21,16 @@ import Control.Monad
import Graphics.X11
import Graphics.X11.Xlib.Extras
import Xmobar.Run.Exec
+import Xmobar.Run.Actions (stripActions)
+
#ifdef UTF8
#undef UTF8
import Codec.Binary.UTF8.String as UTF8
#define UTF8
#endif
+
import Foreign.C (CChar)
import Xmobar.X11.Events (nextEvent')
-import Xmobar.X11.Actions (stripActions)
data XMonadLog = XMonadLog
| UnsafeXMonadLog
diff --git a/src/Xmobar/X11/Actions.hs b/src/Xmobar/Run/Actions.hs
index 87c03ed..f7d0e45 100644
--- a/src/Xmobar/X11/Actions.hs
+++ b/src/Xmobar/Run/Actions.hs
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------------
-- |
--- Module : Xmobar.Actions
+-- Module : Xmobar.Run.Actions
-- Copyright : (c) Alexander Polakov
-- License : BSD-style (see LICENSE)
--
@@ -10,12 +10,14 @@
--
-----------------------------------------------------------------------------
-module Xmobar.X11.Actions (Action(..), runAction, stripActions) where
+module Xmobar.Run.Actions (Button, Action(..), runAction, stripActions) where
import System.Process (system)
import Control.Monad (void)
import Text.Regex (Regex, subRegex, mkRegex, matchRegex)
-import Graphics.X11.Types (Button)
+import Data.Word (Word32)
+
+type Button = Word32
data Action = Spawn [Button] String
deriving (Eq, Show)
diff --git a/src/Xmobar/X11/Bitmap.hs b/src/Xmobar/X11/Bitmap.hs
index c17f9d2..2dd47ac 100644
--- a/src/Xmobar/X11/Bitmap.hs
+++ b/src/Xmobar/X11/Bitmap.hs
@@ -2,7 +2,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : X11.Bitmap
--- Copyright : (C) 2013, 2015, 2017, 2018 Alexander Polakov
+-- Copyright : (C) 2013, 2015, 2017, 2018, 2022 Alexander Polakov
-- License : BSD3
--
-- Maintainer : jao@gnu.org
@@ -23,9 +23,9 @@ import Graphics.X11.Xlib
import System.Directory (doesFileExist)
import System.FilePath ((</>))
import System.Mem.Weak ( addFinalizer )
+import Xmobar.Run.Actions (Action)
import Xmobar.X11.ColorCache
import Xmobar.X11.Parsers (TextRenderInfo(..), Widget(..))
-import Xmobar.X11.Actions (Action)
#ifdef XPM
import Xmobar.X11.XPMFile(readXPMFile)
diff --git a/src/Xmobar/X11/Draw.hs b/src/Xmobar/X11/Draw.hs
index 129701b..30f0b75 100644
--- a/src/Xmobar/X11/Draw.hs
+++ b/src/Xmobar/X11/Draw.hs
@@ -32,8 +32,8 @@ import Graphics.X11.Xlib hiding (textExtents, textWidth)
import Graphics.X11.Xlib.Extras
import Xmobar.Config.Types
+import Xmobar.Run.Actions (Action(..))
import qualified Xmobar.X11.Bitmap as B
-import Xmobar.X11.Actions (Action(..))
import Xmobar.X11.Types
import Xmobar.X11.Text
import Xmobar.X11.ColorCache
diff --git a/src/Xmobar/X11/Parsers.hs b/src/Xmobar/X11/Parsers.hs
index 0119208..4688760 100644
--- a/src/Xmobar/X11/Parsers.hs
+++ b/src/Xmobar/X11/Parsers.hs
@@ -25,14 +25,13 @@ module Xmobar.X11.Parsers ( parseString
, Widget(..)) where
import Xmobar.Config.Types
-import Xmobar.X11.Actions
+import Xmobar.Run.Actions
import Control.Monad (guard, mzero)
import Data.Maybe (fromMaybe)
import Data.Int (Int32)
import Text.ParserCombinators.Parsec
import Text.Read (readMaybe)
-import Graphics.X11.Types (Button)
import Foreign.C.Types (CInt)
data Widget = Icon String | Text String | Hspace Int32 deriving Show