aboutsummaryrefslogtreecommitdiffstats
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
commite1334df795b0bf5054113a1e65ca2f5bff204a3f (patch)
tree38bb32bcfb274e2b0934fa20a49967f8a5cc5fb7 /Main.hs
parentaac1f9abba673429c95ddaad1ffb5552eb833a66 (diff)
downloadxmonad-e1334df795b0bf5054113a1e65ca2f5bff204a3f.tar.gz
xmonad-e1334df795b0bf5054113a1e65ca2f5bff204a3f.tar.xz
xmonad-e1334df795b0bf5054113a1e65ca2f5bff204a3f.zip
Add promote. Makes the focused window the master
darcs-hash:20070322222333-a5988-bd6295590c0695d7c43294fd535319e0fbde2e70.gz
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