summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Config.hs3
-rw-r--r--src/Window.hs4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/Config.hs b/src/Config.hs
index 622c79c..6ab3f8d 100644
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -23,6 +23,7 @@ module Config
, runnableTypes
) where
+
import Commands
import {-# SOURCE #-} Runnable
import Plugins.Monitors
@@ -73,7 +74,9 @@ data Config =
data XPosition = Top
| TopW Align Int
| TopSize Align Int Int
+ | TopP Int Int
| Bottom
+ | BottomP Int Int
| BottomW Align Int
| BottomSize Align Int Int
| Static {xpos, ypos, width, height :: Int}
diff --git a/src/Window.hs b/src/Window.hs
index e9a67cf..f43fe4b 100644
--- a/src/Window.hs
+++ b/src/Window.hs
@@ -59,10 +59,12 @@ setPosition :: XPosition -> [Rectangle] -> Dimension -> (Rectangle,Bool)
setPosition p rs ht =
case p' of
Top -> (Rectangle rx ry rw h, True)
+ TopP l r -> (Rectangle (rx + fi l) ry (rw - fi l - fi r) h, True)
TopW a i -> (Rectangle (ax a i) ry (nw i) h, True)
TopSize a i ch -> (Rectangle (ax a i) ry (nw i) (mh ch), True)
Bottom -> (Rectangle rx ny rw h, True)
BottomW a i -> (Rectangle (ax a i) ny (nw i) h, True)
+ BottomP l r -> (Rectangle (rx + fi l) ny (rw - fi l - fi r) h, True)
BottomSize a i ch -> (Rectangle (ax a i) (ny' ch) (nw i) (mh ch), True)
Static cx cy cw ch -> (Rectangle (fi cx) (fi cy) (fi cw) (fi ch), True)
OnScreen _ p'' -> setPosition p'' [scr] ht
@@ -115,9 +117,11 @@ getStrutValues r@(Rectangle x y w h) p rwh =
case p of
OnScreen _ p' -> getStrutValues r p' rwh
Top -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0]
+ TopP _ _ -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0]
TopW _ _ -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0]
TopSize {} -> [0, 0, st, 0, 0, 0, 0, 0, nx, nw, 0, 0]
Bottom -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw]
+ BottomP _ _ -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw]
BottomW _ _ -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw]
BottomSize {} -> [0, 0, 0, sb, 0, 0, 0, 0, 0, 0, nx, nw]
Static {} -> getStaticStrutValues p rwh