aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2020-02-07 15:16:03 -0700
committerJosh Rahm <rahm@google.com>2020-02-07 15:16:03 -0700
commitbdc2567c9fa936179a57f77750fec6db1de505e7 (patch)
tree89764338318f5bdf5d1af3abad2f0791a0efb37e /src
parent7bd59751a820dbdfb132ae2f06be518bd2f7fad4 (diff)
downloadrde-bdc2567c9fa936179a57f77750fec6db1de505e7.tar.gz
rde-bdc2567c9fa936179a57f77750fec6db1de505e7.tar.bz2
rde-bdc2567c9fa936179a57f77750fec6db1de505e7.zip
Add accordion and circle layouts
Diffstat (limited to 'src')
-rw-r--r--src/Internal/Keys.hs3
-rw-r--r--src/Internal/Layout.hs4
-rw-r--r--src/Internal/LayoutDraw.hs2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs
index a397467..c1d1c70 100644
--- a/src/Internal/Keys.hs
+++ b/src/Internal/Keys.hs
@@ -115,6 +115,9 @@ newKeys =
, ((modm, xK_q), spawn "xmonad --recompile && xmonad --restart")
, ((modm, xK_z), sendMessage ToggleZoom)
+
+ , ((modm, xK_Tab), windows W.focusDown)
+ , ((modm .|. shiftMask, xK_Tab), windows W.focusUp)
]
mapNumbersAndAlpha :: KeyMask -> (Char -> X ()) -> Map (KeyMask, KeySym) (X ())
diff --git a/src/Internal/Layout.hs b/src/Internal/Layout.hs
index 57102c6..b071e74 100644
--- a/src/Internal/Layout.hs
+++ b/src/Internal/Layout.hs
@@ -1,6 +1,8 @@
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
module Internal.Layout where
+import XMonad.Layout.Circle
+import XMonad.Layout.Accordion
import Control.Applicative
import XMonad.Layout.Spacing
import Data.List
@@ -20,6 +22,8 @@ myLayout =
spiral (6/7) |||
Tall 1 (3/100) (1/2) |||
ThreeCol 1 (3/100) (1/2) |||
+ Circle |||
+ Accordion |||
Grid
data ResizeZoom = ShrinkZoom | ExpandZoom deriving (Typeable)
diff --git a/src/Internal/LayoutDraw.hs b/src/Internal/LayoutDraw.hs
index 4a980b4..7dc2087 100644
--- a/src/Internal/LayoutDraw.hs
+++ b/src/Internal/LayoutDraw.hs
@@ -71,7 +71,7 @@ drawPng l = do
setLineCap LineCapButt
setLineJoin LineJoinMiter
- forM_ (zip (map (second padR) rects) colors) $
+ forM_ (reverse $ zip (map (second padR) rects) colors) $
\((wind, Rectangle x y w h), (r, g, b)) -> do
setSourceRGBA r g b 1