summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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