From 5566b2bf2fa6fba2fc3709db663b4ea1353086f3 Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Tue, 10 Mar 2015 22:43:14 +0100 Subject: Add XMonad.Config.Bepo (Yorick Laupa) Ignore-this: 71dcf03f9ff80b645531004f95e9c600 darcs-hash:20150310214314-1499c-46bf6ba10c8800eaaa3677ba94772b49f7126e54.gz --- XMonad/Config/Bepo.hs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ xmonad-contrib.cabal | 1 + 2 files changed, 48 insertions(+) create mode 100644 XMonad/Config/Bepo.hs diff --git a/XMonad/Config/Bepo.hs b/XMonad/Config/Bepo.hs new file mode 100644 index 0000000..65371c7 --- /dev/null +++ b/XMonad/Config/Bepo.hs @@ -0,0 +1,47 @@ +{-# OPTIONS_GHC -fno-warn-missing-signatures #-} + +----------------------------------------------------------------------------- +-- | +-- Module : XMonad.Config.Bepo +-- Copyright : (c) Yorick Laupa +-- License : BSD +-- +-- Maintainer : Yorick Laupa +-- Stability : stable +-- Portability : unportable +-- +-- This module fixes some of the keybindings for the francophone among you who +-- use a BEPO keyboard layout. Based on XMonad.Config.Azerty + +module XMonad.Config.Bepo ( + -- * Usage + -- $usage + bepoConfig, bepoKeys + ) where + +import XMonad +import qualified XMonad.StackSet as W + +import qualified Data.Map as M + +-- $usage +-- To use this module, start with the following @~\/.xmonad\/xmonad.hs@: +-- +-- > import XMonad +-- > import XMonad.Config.Bepo +-- > +-- > main = xmonad bepoConfig +-- +-- If you prefer, an bepoKeys function is provided which you can use as so: +-- +-- > import qualified Data.Map as M +-- > main = xmonad someConfig { keys = \c -> bepoKeys c `M.union` keys someConfig c } + +bepoConfig = def { keys = bepoKeys <+> keys def } + +bepoKeys conf@(XConfig { modMask = modm }) = M.fromList $ + [((modm, xK_semicolon), sendMessage (IncMasterN (-1)))] + ++ + [((m .|. modm, k), windows $ f i) + | (i, k) <- zip (workspaces conf) [0x22,0xab,0xbb,0x28,0x29,0x40,0x2b,0x2d,0x2f,0x2a], + (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] diff --git a/xmonad-contrib.cabal b/xmonad-contrib.cabal index c949aca..320b400 100644 --- a/xmonad-contrib.cabal +++ b/xmonad-contrib.cabal @@ -147,6 +147,7 @@ library XMonad.Config.Arossato XMonad.Config.Azerty XMonad.Config.Bluetile + XMonad.Config.Bepo XMonad.Config.Desktop XMonad.Config.Dmwit XMonad.Config.Droundy -- cgit v1.2.3