style(prog/xmonad): change layout for web and chat
This commit is contained in:
parent
8a6616cdfe
commit
74f7e461c9
1 changed files with 19 additions and 18 deletions
|
@ -15,6 +15,7 @@ import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.StatusBar
|
import XMonad.Hooks.StatusBar
|
||||||
import XMonad.Hooks.StatusBar.PP
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
import XMonad.Layout.PerWorkspace
|
||||||
import XMonad.Util.Run
|
import XMonad.Util.Run
|
||||||
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
@ -53,7 +54,7 @@ myModMask = mod1Mask
|
||||||
--
|
--
|
||||||
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
|
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
|
||||||
--
|
--
|
||||||
myWorkspaces = map show [1..9]
|
myWorkspaces = ["web", "front", "back", "chat"] <> map show [5..9]
|
||||||
|
|
||||||
-- Border colors for unfocused and focused windows, respectively.
|
-- Border colors for unfocused and focused windows, respectively.
|
||||||
--
|
--
|
||||||
|
@ -90,19 +91,19 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
, ((modm, xK_j ), windows W.focusDown)
|
, ((modm, xK_j ), windows W.focusDown)
|
||||||
|
|
||||||
-- Move focus to the previous window
|
-- Move focus to the previous window
|
||||||
, ((modm, xK_k ), windows W.focusUp )
|
, ((modm, xK_k ), windows W.focusUp)
|
||||||
|
|
||||||
-- Move focus to the master window
|
-- Move focus to the master window
|
||||||
, ((modm, xK_m ), windows W.focusMaster )
|
, ((modm, xK_m ), windows W.focusMaster)
|
||||||
|
|
||||||
-- Swap the focused window and the master window
|
-- Swap the focused window and the master window
|
||||||
, ((modm, xK_Return), windows W.swapMaster)
|
, ((modm, xK_Return), windows W.swapMaster)
|
||||||
|
|
||||||
-- Swap the focused window with the next window
|
-- Swap the focused window with the next window
|
||||||
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
|
, ((modm .|. shiftMask, xK_j ), windows W.swapDown)
|
||||||
|
|
||||||
-- Swap the focused window with the previous window
|
-- Swap the focused window with the previous window
|
||||||
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
|
, ((modm .|. shiftMask, xK_k ), windows W.swapUp)
|
||||||
|
|
||||||
-- Shrink the master area
|
-- Shrink the master area
|
||||||
, ((modm, xK_h ), sendMessage Shrink)
|
, ((modm, xK_h ), sendMessage Shrink)
|
||||||
|
@ -114,10 +115,10 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||||
, ((modm, xK_t ), withFocused $ windows . W.sink)
|
, ((modm, xK_t ), withFocused $ windows . W.sink)
|
||||||
|
|
||||||
-- Increment the number of windows in the master area
|
-- Increment the number of windows in the master area
|
||||||
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
|
, ((modm , xK_comma ), sendMessage $ IncMasterN 1)
|
||||||
|
|
||||||
-- Deincrement the number of windows in the master area
|
-- Deincrement the number of windows in the master area
|
||||||
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
|
, ((modm , xK_period), sendMessage $ IncMasterN (-1))
|
||||||
|
|
||||||
-- Toggle the status bar gap
|
-- Toggle the status bar gap
|
||||||
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
-- Use this binding with avoidStruts from Hooks.ManageDocks.
|
||||||
|
@ -184,17 +185,17 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList
|
||||||
-- The available layouts. Note that each layout is separated by |||,
|
-- The available layouts. Note that each layout is separated by |||,
|
||||||
-- which denotes layout choice.
|
-- which denotes layout choice.
|
||||||
--
|
--
|
||||||
myLayout = avoidStruts (tiled ||| Mirror tiled ||| Full)
|
myLayout = avoidStruts
|
||||||
|
$ onWorkspaces ["web", "chat"] (makeLayout (1/2))
|
||||||
|
$ makeLayout (1/1.5)
|
||||||
where
|
where
|
||||||
-- default tiling algorithm partitions the screen into two panes
|
makeLayout ratio = makeLayoutTall ratio ||| Mirror (makeLayoutTall ratio) ||| Full
|
||||||
tiled = Tall nmaster delta ratio
|
|
||||||
|
makeLayoutTall = Tall nmaster delta
|
||||||
|
|
||||||
-- The default number of windows in the master pane
|
-- The default number of windows in the master pane
|
||||||
nmaster = 1
|
nmaster = 1
|
||||||
|
|
||||||
-- Default proportion of screen occupied by master pane
|
|
||||||
ratio = 1/1.5
|
|
||||||
|
|
||||||
-- Percent of screen to increment by when resizing panes
|
-- Percent of screen to increment by when resizing panes
|
||||||
delta = 3/100
|
delta = 3/100
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue