diff options
-rw-r--r-- | Config.hs | 1 | ||||
-rw-r--r-- | Operations.hs | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -142,6 +142,7 @@ keys = M.fromList $ , ((modMask .|. shiftMask, xK_c ), kill) -- %! Close the focused window , ((modMask, xK_space ), sendMessage NextLayout) -- %! Rotate through the available layout algorithms + , ((modMask .|. shiftMask, xK_space ), setLayout $ SomeLayout $ LayoutSelection defaultLayouts) -- %! Reset the layouts on the current workspace to default , ((modMask, xK_n ), refresh) -- %! Resize viewed windows to the correct size diff --git a/Operations.hs b/Operations.hs index 128c4ad..ee1fd80 100644 --- a/Operations.hs +++ b/Operations.hs @@ -326,6 +326,13 @@ runOnWorkspaces job = do ws <- gets windowset instance Message Event +-- | Set the layout of the currently viewed workspace +setLayout :: SomeLayout Window -> X () +setLayout l = do + sendMessage ReleaseResources + windows $ \ss@(W.StackSet { W.current = c@(W.Screen { W.workspace = ws })}) + -> ss {W.current = c { W.workspace = ws { W.layout = l } } } + -- Layout selection manager -- This is a layout that allows users to switch between various layout |