aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorWirt Wolff <wirtwolff@gmail.com>2009-09-06 09:05:03 +0200
committerWirt Wolff <wirtwolff@gmail.com>2009-09-06 09:05:03 +0200
commitbc63fc5a21ef96d624c5c3bb665375ff509d5990 (patch)
tree5881922d234b0cd99bf96e372e7abff3efee1181 /XMonad
parentc1a6ed7be8b090cea63a70fa86ee614d011d0f63 (diff)
downloadXMonadContrib-bc63fc5a21ef96d624c5c3bb665375ff509d5990.tar.gz
XMonadContrib-bc63fc5a21ef96d624c5c3bb665375ff509d5990.tar.xz
XMonadContrib-bc63fc5a21ef96d624c5c3bb665375ff509d5990.zip
U.EZConfig: Correct additionalKeysP M2-M5 values
Ignore-this: 938c9739a8e00c07195890938e7c12fc Was 8,9,10,11,12 rather than needed 8,16,32,64,128 darcs-hash:20090906070503-18562-080841f3293abb69f131cea108291651257811a5.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Util/EZConfig.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/XMonad/Util/EZConfig.hs b/XMonad/Util/EZConfig.hs
index 6e0a4c3..299138b 100644
--- a/XMonad/Util/EZConfig.hs
+++ b/XMonad/Util/EZConfig.hs
@@ -36,7 +36,7 @@ import XMonad.Actions.Submap
import XMonad.Util.NamedActions
import qualified Data.Map as M
-import Data.List (foldl', intersperse, sortBy, groupBy, nub)
+import Data.List (foldl', sortBy, groupBy, nub)
import Data.Ord (comparing)
import Data.Maybe
import Control.Arrow (first, (&&&))
@@ -413,7 +413,8 @@ parseModifier c = (string "M-" >> return (modMask c))
+++ do char 'M'
n <- satisfy (`elem` ['1'..'5'])
char '-'
- return (mod1Mask + (read [n]) - 1)
+ return $ indexMod (read [n] - 1)
+ where indexMod = (!!) [mod1Mask,mod2Mask,mod3Mask,mod4Mask,mod5Mask]
-- | Parse an unmodified basic key, like @\"x\"@, @\"<F1>\"@, etc.
parseKey :: ReadP KeySym
@@ -441,7 +442,7 @@ keyNames = functionKeys ++ specialKeys ++ multimediaKeys
-- | A list pairing function key descriptor strings (e.g. @\"<F2>\"@) with
-- the associated KeySyms.
functionKeys :: [(String, KeySym)]
-functionKeys = [ ("F" ++ show n, k)
+functionKeys = [ ('F' : show n, k)
| (n,k) <- zip ([1..24] :: [Int]) [xK_F1..] ]
-- | A list of special key names and their corresponding KeySyms.
@@ -703,7 +704,7 @@ checkKeymap conf km = warn (doKeymapCheck conf km)
++ msg "duplicate" dup ++ "'"
msg _ [] = ""
msg m xs = m ++ " keybindings detected: " ++ showBindings xs
- showBindings = concat . intersperse " " . map ((++"\"") . ("\""++))
+ showBindings = unwords . map (("\""++) . (++"\""))
-- | Given a config and a list of (key sequence description, action)
-- pairs, check the key sequence descriptions for validity,