summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-04-01 04:54:33 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-04-01 04:54:33 +0200
commit8122f7672eeaf1bce37c37b64cb66b9e140fc445 (patch)
treedc6eb690eaae1cc7ef3a7ea39e8df3a336a2d79e
parentf796fb0976b65620a4e6ab80e045e1be3fdeb0de (diff)
downloadmetatile-8122f7672eeaf1bce37c37b64cb66b9e140fc445.tar
metatile-8122f7672eeaf1bce37c37b64cb66b9e140fc445.zip
restore dwm-style keybindings. mod-shift-{j,k} resize in vert mode
darcs-hash:20070401025433-9c5c1-79adc3fdb8db4cf7929dd6d121ec66c21f24a0e2
-rw-r--r--Config.hs19
-rw-r--r--Operations.hs6
2 files changed, 17 insertions, 8 deletions
diff --git a/Config.hs b/Config.hs
index 604ebf3..03098f5 100644
--- a/Config.hs
+++ b/Config.hs
@@ -68,18 +68,23 @@ keys = M.fromList $
[ ((modMask .|. shiftMask, xK_Return), spawn "xterm")
, ((modMask, xK_p ), spawn "exe=`dmenu_path | dmenu` && exec $exe")
, ((modMask .|. shiftMask, xK_F11 ), spawn "gmrun")
- , ((modMask, xK_Tab ), raise GT)
- , ((modMask, xK_j ), changeVert defaultDelta)
- , ((modMask, xK_k ), changeVert (negate defaultDelta))
+ , ((modMask, xK_space ), switchLayout)
+
, ((modMask, xK_h ), changeHorz (negate defaultDelta))
, ((modMask, xK_l ), changeHorz defaultDelta)
- , ((modMask, xK_F10 ), changeSize sizeDelta (1%100))
- , ((modMask, xK_F9 ), changeSize (negate sizeDelta) (1%100))
+ , ((modMask .|. shiftMask, xK_j ), changeVert defaultDelta)
+ , ((modMask .|. shiftMask, xK_k ), changeVert (negate defaultDelta))
+
+ , ((modMask, xK_Tab ), raise GT)
+ , ((modMask, xK_j ), raise GT)
+ , ((modMask, xK_k ), raise LT)
+
, ((modMask .|. shiftMask, xK_c ), kill)
, ((modMask .|. shiftMask, xK_q ), io $ exitWith ExitSuccess)
- , ((modMask .|. shiftMask, xK_F12 ), io restart)
- , ((modMask, xK_space ), switchLayout)
+ , ((modMask .|. shiftMask, xK_r ), io restart)
+
, ((modMask, xK_Return), promote)
+
] ++
-- Keybindings to each workspace:
[((m .|. modMask, xK_0 + fromIntegral i), f i)
diff --git a/Operations.hs b/Operations.hs
index e404b7d..decb42f 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -244,7 +244,11 @@ setBorder w p = withDisplay $ \d -> io $ setWindowBorder d w p
raise :: Ordering -> X ()
raise = windows . W.rotate
--- | promote. Make the focused window the master window in its workspace
+-- | promote. Make the focused window the master window in its
+-- workspace , in non-fullscreen mode.
+--
+-- TODO: generic cycling clockwise and anticlockwise
+--
promote :: X ()
promote = windows $ \w -> maybe w (\k -> W.promote k w) (W.peek w)