aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Config
diff options
context:
space:
mode:
authorDevin Mullins <me@twifkak.com>2008-09-24 06:49:46 +0200
committerDevin Mullins <me@twifkak.com>2008-09-24 06:49:46 +0200
commitb09eacbae6d94f294050a7eb0d29a96d5a163180 (patch)
treef24fe5b73e673a6e78e4f4d527469a152176e4fd /XMonad/Config
parenta0603c8470ea8304e1c927783c83f7439c3a7e66 (diff)
downloadXMonadContrib-b09eacbae6d94f294050a7eb0d29a96d5a163180.tar.gz
XMonadContrib-b09eacbae6d94f294050a7eb0d29a96d5a163180.tar.xz
XMonadContrib-b09eacbae6d94f294050a7eb0d29a96d5a163180.zip
add XMonad.Config.Azerty
darcs-hash:20080924044946-78224-2db16d2bd81ac1419418c56360079b168ccd7226.gz
Diffstat (limited to 'XMonad/Config')
-rw-r--r--XMonad/Config/Azerty.hs46
1 files changed, 46 insertions, 0 deletions
diff --git a/XMonad/Config/Azerty.hs b/XMonad/Config/Azerty.hs
new file mode 100644
index 0000000..06e987e
--- /dev/null
+++ b/XMonad/Config/Azerty.hs
@@ -0,0 +1,46 @@
+{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
+
+-----------------------------------------------------------------------------
+-- |
+-- Module : XMonad.Config.Azerty
+-- Copyright : (c) Devin Mullins <me@twifkak.com>
+-- License : BSD
+--
+-- Maintainer : Devin Mullins <me@twifkak.com>
+--
+-- This module fixes some of the keybindings for the francophone among you who
+-- use an AZERTY keyboard layout. Config stolen from TeXitoi's config on the
+-- wiki.
+
+module XMonad.Config.Azerty (
+ -- * Usage
+ -- $usage
+ azertyConfig, azertyKeys
+ ) 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.Azerty
+-- >
+-- > main = xmonad azertyConfig
+--
+-- If you prefer, an azertyKeys function is provided which you can use as so:
+--
+-- > import qualified Data.Map as M
+-- > main = xmonad someConfig { keys = \c -> azertyKeys c `M.union` keys someConfig c }
+
+azertyConfig = defaultConfig { keys = \c -> azertyKeys c `M.union` keys defaultConfig c }
+
+azertyKeys conf@(XConfig {modMask = modm}) = M.fromList $
+ [((modm, xK_semicolon), sendMessage (IncMasterN (-1)))]
+ ++
+ [((m .|. modm, k), windows $ f i)
+ | (i, k) <- zip (workspaces conf) [0x26,0xe9,0x22,0x27,0x28,0x2d,0xe8,0x5f,0xe7,0xe0],
+ (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]