summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-03-22 23:23:33 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-03-22 23:23:33 +0100
commitf4897ee9bb57d583bc86853760cfa8e951be647b (patch)
tree38bb32bcfb274e2b0934fa20a49967f8a5cc5fb7 /Main.hs
parent78b0adb5a1fd50642b2df05bd1353a7e5ecf4643 (diff)
downloadmetatile-f4897ee9bb57d583bc86853760cfa8e951be647b.tar
metatile-f4897ee9bb57d583bc86853760cfa8e951be647b.zip
Add promote. Makes the focused window the master
darcs-hash:20070322222333-a5988-bd6295590c0695d7c43294fd535319e0fbde2e70
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Main.hs b/Main.hs
index 45d6702..5cadc99 100644
--- a/Main.hs
+++ b/Main.hs
@@ -59,6 +59,7 @@ keys = M.fromList $
, ((modMask .|. shiftMask, xK_c ), kill)
, ((modMask .|. shiftMask, xK_q ), io $ exitWith ExitSuccess)
, ((modMask, xK_space ), switchLayout)
+ , ((modMask, xK_Return), promote)
] ++
-- generate keybindings to each workspace:
[((m .|. modMask, xK_0 + fromIntegral i), f i)
@@ -354,6 +355,10 @@ setTopFocus = do
raise :: Ordering -> X ()
raise = windows . W.rotate
+-- | promote. Make the focused window the master window in its workspace
+promote :: X ()
+promote = windows (\w -> maybe w (\k -> W.promote k w) (W.peek w))
+
-- | Kill the currently focused client
kill :: X ()
kill = withDisplay $ \d -> do