浏览代码

~/.xmonad: Swap key map using xkbswap.

Lucas Stadler 12 年之前
父节点
当前提交
84a6db190a
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 1 7
      .xmonad/xmonad.hs

+ 1 - 7
.xmonad/xmonad.hs

@ -25,7 +25,6 @@ import Data.Monoid (All (All))
25 25
(??) = flip fmap
26 26
27 27
main = do
28
    kbMap <- newIORef "us"
29 28
    xmonad $ defaultConfig {
30 29
        modMask  = mod4Mask,
31 30
        terminal = "sakura",
@ -49,13 +48,8 @@ main = do
49 48
        ((0, xF86XK_AudioRaiseVolume), spawn "amixer set Master 5%+"),
50 49
        ((mod4Mask .|. shiftMask, xK_m), spawnHere "quodlibet"),
51 50
52
        ((mod4Mask .|. shiftMask, xK_Tab), changeKbMap kbMap),
51
        ((mod4Mask .|. shiftMask, xK_Tab), spawn "xkbswap"),
53 52
        ((mod4Mask .|. shiftMask, xK_l), spawn "slock"),
54 53
55 54
        ((mod4Mask, xK_q), restart "xmonad" True)
56 55
     ]
57
  where changeKbMap kbMap = do
58
          kb <- readIORef kbMap
59
          let switchLang cur = if cur == "us" then "de" else "us"
60
          spawn $ "setxkbmap " ++ switchLang kb
61
          modifyIORef kbMap switchLang