Zoom button

This commit is contained in:
Mats Rauhala 2019-06-03 15:27:18 +03:00
parent 892c6c3b72
commit 2f2593eabc

View File

@ -1,7 +1,8 @@
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-} {-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module XMonad.Config.MasseR where module XMonad.Config.MasseR where
@ -23,7 +24,7 @@ import XMonad.Layout.Decoration (Decoration,
import XMonad.Layout.DwmStyle import XMonad.Layout.DwmStyle
import XMonad.Layout.LayoutModifier (ModifiedLayout) import XMonad.Layout.LayoutModifier (ModifiedLayout)
import XMonad.Layout.Master import XMonad.Layout.Master
import XMonad.Layout.NoBorders (smartBorders) import XMonad.Layout.NoBorders (noBorders, smartBorders)
import XMonad.Layout.PerWorkspace (onWorkspace) import XMonad.Layout.PerWorkspace (onWorkspace)
import XMonad.Layout.Renamed import XMonad.Layout.Renamed
import XMonad.Layout.Simplest (Simplest) import XMonad.Layout.Simplest (Simplest)
@ -31,7 +32,8 @@ import XMonad.Layout.Spiral
import XMonad.Layout.Tabbed (TabbedDecoration, import XMonad.Layout.Tabbed (TabbedDecoration,
Theme (..), shrinkText, Theme (..), shrinkText,
tabbed) tabbed)
import XMonad.Layout.ToggleLayouts (ToggleLayout (..)) import XMonad.Layout.ToggleLayouts (ToggleLayout (..),
toggleLayouts)
import XMonad.Password import XMonad.Password
import XMonad.Prompt.RunOrRaise (runOrRaisePrompt) import XMonad.Prompt.RunOrRaise (runOrRaisePrompt)
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
@ -205,6 +207,7 @@ myKeys extraConfig conf =
] ^++^ ] ^++^
subKeys "Projects & Workspaces" (topicKeys' extraConfig conf) ^++^ subKeys "Projects & Workspaces" (topicKeys' extraConfig conf) ^++^
subKeys "Layout management" [ ("M-C-<Space>", addName "Toggle layout" $ sendMessage ToggleLayout) subKeys "Layout management" [ ("M-C-<Space>", addName "Toggle layout" $ sendMessage ToggleLayout)
, ("M-z", addName "Toggle zoom" $ sendMessage (Toggle "Zoom"))
, ("M-<Space>", addName "Next layout" $ sendMessage NextLayout)] ^++^ , ("M-<Space>", addName "Next layout" $ sendMessage NextLayout)] ^++^
subKeys "Resize" [] subKeys "Resize" []
where where
@ -240,13 +243,15 @@ masser extraConfig = xmonad =<< statusBar (bar extraConfig) zenburnPP toggleStru
, manageHook = myManageHook , manageHook = myManageHook
, focusFollowsMouse = False , focusFollowsMouse = False
} }
myLayout = onWorkspace "web" webLayout $ myLayout = toggleLayouts zoom workspaceLayouts
onWorkspace "dynamics" webLayout $
onWorkspace "pdf" pdfLayout $
onWorkspace "documents" documentLayout $
onWorkspace "mail" mailLayout
defLayout
where where
zoom = renamed [Replace "Zoom"] (noBorders Full)
workspaceLayouts = onWorkspace "web" webLayout $
onWorkspace "dynamics" webLayout $
onWorkspace "pdf" pdfLayout $
onWorkspace "documents" documentLayout $
onWorkspace "mail" mailLayout
defLayout
-- Default layout -- Default layout
defLayout = tiled ||| tabLayout ||| readLayout ||| bspLayout ||| vimLayout ||| spiral (6/7) ||| Full defLayout = tiled ||| tabLayout ||| readLayout ||| bspLayout ||| vimLayout ||| spiral (6/7) ||| Full
-- Pdfs are restricted to tabs -- Pdfs are restricted to tabs