{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module XMonad.Config.Bepo (
bepoConfig, bepoKeys
) where
import XMonad
import qualified XMonad.StackSet as W
import qualified Data.Map as M
bepoConfig :: XConfig (Choose Tall (Choose (Mirror Tall) Full))
bepoConfig = XConfig (Choose Tall (Choose (Mirror Tall) Full))
forall a. Default a => a
def { keys :: XConfig Layout -> Map (ButtonMask, KeySym) (X ())
keys = XConfig Layout -> Map (ButtonMask, KeySym) (X ())
forall (l :: * -> *). XConfig l -> Map (ButtonMask, KeySym) (X ())
bepoKeys (XConfig Layout -> Map (ButtonMask, KeySym) (X ()))
-> (XConfig Layout -> Map (ButtonMask, KeySym) (X ()))
-> XConfig Layout
-> Map (ButtonMask, KeySym) (X ())
forall m. Monoid m => m -> m -> m
<+> XConfig (Choose Tall (Choose (Mirror Tall) Full))
-> XConfig Layout -> Map (ButtonMask, KeySym) (X ())
forall (l :: * -> *).
XConfig l -> XConfig Layout -> Map (ButtonMask, KeySym) (X ())
keys XConfig (Choose Tall (Choose (Mirror Tall) Full))
forall a. Default a => a
def }
bepoKeys :: XConfig l -> Map (ButtonMask, KeySym) (X ())
bepoKeys conf :: XConfig l
conf@(XConfig { modMask :: forall (l :: * -> *). XConfig l -> ButtonMask
modMask = ButtonMask
modm }) = [((ButtonMask, KeySym), X ())] -> Map (ButtonMask, KeySym) (X ())
forall k a. Ord k => [(k, a)] -> Map k a
M.fromList ([((ButtonMask, KeySym), X ())] -> Map (ButtonMask, KeySym) (X ()))
-> [((ButtonMask, KeySym), X ())]
-> Map (ButtonMask, KeySym) (X ())
forall a b. (a -> b) -> a -> b
$
[((ButtonMask
modm, KeySym
xK_semicolon), IncMasterN -> X ()
forall a. Message a => a -> X ()
sendMessage (Int -> IncMasterN
IncMasterN (-1)))]
[((ButtonMask, KeySym), X ())]
-> [((ButtonMask, KeySym), X ())] -> [((ButtonMask, KeySym), X ())]
forall a. [a] -> [a] -> [a]
++
[((ButtonMask
m ButtonMask -> ButtonMask -> ButtonMask
forall a. Bits a => a -> a -> a
.|. ButtonMask
modm, KeySym
k), (WindowSet -> WindowSet) -> X ()
windows ((WindowSet -> WindowSet) -> X ())
-> (WindowSet -> WindowSet) -> X ()
forall a b. (a -> b) -> a -> b
$ String -> WindowSet -> WindowSet
f String
i)
| (i :: String
i, k :: KeySym
k) <- [String] -> [KeySym] -> [(String, KeySym)]
forall a b. [a] -> [b] -> [(a, b)]
zip (XConfig l -> [String]
forall (l :: * -> *). XConfig l -> [String]
workspaces XConfig l
conf) [0x22,0xab,0xbb,0x28,0x29,0x40,0x2b,0x2d,0x2f,0x2a],
(f :: String -> WindowSet -> WindowSet
f, m :: ButtonMask
m) <- [(String -> WindowSet -> WindowSet
forall s i l a sd.
(Eq s, Eq i) =>
i -> StackSet i l a s sd -> StackSet i l a s sd
W.greedyView, 0), (String -> WindowSet -> WindowSet
forall a s i l sd.
(Ord a, Eq s, Eq i) =>
i -> StackSet i l a s sd -> StackSet i l a s sd
W.shift, ButtonMask
shiftMask)]]