Browse Source

Change border to 2px, fix layout names, add spacing key bindings

master
Peter J. Jones 1 month ago
parent
commit
7badb39756
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
4 changed files with 24 additions and 12 deletions
  1. 12
    4
      src/XMonad/Local/Keys.hs
  2. 4
    4
      src/XMonad/Local/Layout.hs
  3. 1
    1
      src/XMonad/Local/Theme.hs
  4. 7
    3
      src/XMonad/Local/Workspaces.hs

+ 12
- 4
src/XMonad/Local/Keys.hs View File

@@ -41,7 +41,7 @@ import XMonad.Hooks.UrgencyHook (focusUrgent)
import XMonad.Layout.LayoutBuilder (IncLayoutN(..))
import XMonad.Layout.Maximize (maximizeRestore)
import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing (incWindowSpacing, decWindowSpacing, toggleWindowSpacingEnabled)
import XMonad.Layout.Spacing
import XMonad.Layout.ZoomRow (zoomIn, zoomOut, zoomReset)
import XMonad.Prompt
import XMonad.Prompt.Shell (shellPrompt)
@@ -192,10 +192,18 @@ layoutKeys c =
, ("M-w <Esc>", setLayout (layoutHook c)) -- Reset to default layout.
, ("M-S-1", withFocused (sendMessage . maximizeRestore))
, ("M-S-8", cycleThroughLayouts ["Auto", "Focus"])
, ("M-w s", toggleWindowSpacingEnabled)
, ("M-w s t", toggleWindowSpacingEnabled)
, ("M-w s 0", setScreenWindowSpacing 0)
, ("M-w s 1", setScreenWindowSpacing 10)
, ("M-w s 2", setScreenWindowSpacing 20)
, ("M-w s 3", setScreenWindowSpacing 30)
, ("M-w s 4", setScreenWindowSpacing 40)
, ("M-w s 5", setScreenWindowSpacing 5)
, ("M-w s S-=", incScreenWindowSpacing 2)
, ("M-w s -", decScreenWindowSpacing 2)
, ("M-w M-s", sendMessage ToggleStruts)
, ("M-C-S-=", incWindowSpacing 5)
, ("M-C--", decWindowSpacing 5)
, ("M-C-S-=", incWindowSpacing 1)
, ("M-C--", decWindowSpacing 1)
, ("M-z S-=", sendMessage zoomIn)
, ("M-z -", sendMessage zoomOut)
, ("M-z <Esc>", sendMessage zoomReset)

+ 4
- 4
src/XMonad/Local/Layout.hs View File

@@ -57,11 +57,11 @@ layoutHook = maximizeWithPadding 100 allLays
tall = spacing $ ResizableTall 1 (1/100) (3/5) []
focusTag = spacing $ only (Tagged "focus")
grid = spacing Grid
ten80 = centered 2560 (1930, 1090) -- Account for border width
ten80 = centered 2560 (1924, 1084) -- Account for border width
cgrid = layoutAll (relBox (1/8) (1/8) (7/8) (7/8)) grid
small = layoutAll (relBox (1/4) (1/8) (3/4) (7/8)) twoPane
auto = ifMax 1 (noBorders cgrid) $ ifMax 2 twoPane threeCols
autoTall = ifMax 1 (noBorders small) $ ifMax 2 small threeCols
mail = ifMax 1 (noBorders small) $ ifMax 2 small threeCols

-- A layout where windows you want to focus on are specified using
-- @WindowProperties@. Windows matching the given properties will
@@ -90,7 +90,7 @@ layoutHook = maximizeWithPadding 100 allLays

allLays =
renamed [Replace "Auto"] auto |||
renamed [Replace "Auto Tall"] autoTall |||
renamed [Replace "Mail"] mail |||
renamed [Replace "Chat"] chat |||
renamed [Replace "Tall"] tall |||
renamed [Replace "3C"] threeCols |||
@@ -125,7 +125,7 @@ selectLayoutByName conf =
layoutNames :: [(String, String)]
layoutNames =
[ ("Auto", "Auto")
, ("Auto Tall", "Auto Tall")
, ("Mail", "Mail")
, ("Chat", "Chat")
, ("1080p", "1080p")
, ("Big", "Big")

+ 1
- 1
src/XMonad/Local/Theme.hs View File

@@ -19,5 +19,5 @@ import XMonad
xmonadColors :: XConfig a -> XConfig a
xmonadColors x = x { normalBorderColor = "#444444"
, focusedBorderColor = "#ff52bb"
, borderWidth = 5
, borderWidth = 2
}

+ 7
- 3
src/XMonad/Local/Workspaces.hs View File

@@ -22,6 +22,7 @@ import Control.Monad (unless)
import XMonad hiding (terminal)
import XMonad.Actions.DynamicProjects
import XMonad.Layout.LayoutCombinators (JumpToLayout(..))
import XMonad.Layout.Spacing
import qualified XMonad.StackSet as StackSet
import XMonad.Util.NamedScratchpad

@@ -43,13 +44,16 @@ projects =

, Project { projectName = "browsers"
, projectDirectory = "~/download"
, projectStartHook = Just $ spawn "firefox"
, projectStartHook = Just $ do
sendMessage (JumpToLayout "Tall")
spawn "firefox"
}

, Project { projectName = "monitoring"
, projectDirectory = "~/"
, projectStartHook = Just $ do
sendMessage (JumpToLayout "Tall")
setScreenWindowSpacing 20
spawn "chromium --app='https://stats.printedmint.com/d/UpWo-GSWk/machines?orgId=1&refresh=30s&kiosk'"
spawn "chromium --app='https://stats.devalot.com/d/trW0cTIZz/server-health?orgId=1&refresh=10s&kiosk'"
spawn "chromium --app='http://hass.pmade.com:8123/lovelace/0'"
@@ -64,7 +68,7 @@ projects =
, Project { projectName = "mail"
, projectDirectory = "~/"
, projectStartHook = Just $ do
sendMessage (JumpToLayout "Auto Tall")
sendMessage (JumpToLayout "Mail")
spawn "e -cs mail"
}

@@ -94,7 +98,7 @@ projects =
--------------------------------------------------------------------------------
-- | Names of my workspaces.
names :: [WorkspaceId]
names = ["scratch", "browsers", "agenda", "music", "mail", "chat"]
names = ["scratch", "browsers", "music", "mail", "chat"]

--------------------------------------------------------------------------------
scratchPads :: NamedScratchpads

Loading…
Cancel
Save