From bdc2567c9fa936179a57f77750fec6db1de505e7 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 7 Feb 2020 15:16:03 -0700 Subject: Add accordion and circle layouts --- src/Internal/Keys.hs | 3 +++ src/Internal/Layout.hs | 4 ++++ src/Internal/LayoutDraw.hs | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit