summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-08-10 14:06:15 -0400
committerAndrew Cady <d@jerkface.net>2020-08-10 14:09:26 -0400
commit4041539cde8fec354aace254b67889e3cdea9a2d (patch)
tree9bd37289fe29469fb7bd818c4cf957b9ae223c7a
parente6f8629a535d5b0b702a9386c1fec609aac03567 (diff)
improvementsHEADmaster
fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598659
-rw-r--r--stack.yaml2
-rw-r--r--xmonad-config.cabal2
-rw-r--r--xmonad.hs25
3 files changed, 20 insertions, 9 deletions
diff --git a/stack.yaml b/stack.yaml
index 422176c..f7151d0 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,4 +1,4 @@
1resolver: lts-16.0 1resolver: lts-16.8
2packages: 2packages:
3- '.' 3- '.'
4extra-deps: 4extra-deps:
diff --git a/xmonad-config.cabal b/xmonad-config.cabal
index 6b890b8..bce3773 100644
--- a/xmonad-config.cabal
+++ b/xmonad-config.cabal
@@ -7,5 +7,5 @@ cabal-version: >=1.10
7executable xmonad-config-exe 7executable xmonad-config-exe
8 main-is: xmonad.hs 8 main-is: xmonad.hs
9 ghc-options: -threaded -rtsopts -with-rtsopts=-N -W -Wall -O2 9 ghc-options: -threaded -rtsopts -with-rtsopts=-N -W -Wall -O2
10 build-depends: base, xmonad, xmonad-contrib 10 build-depends: base, xmonad, xmonad-contrib, data-default
11 default-language: Haskell2010 11 default-language: Haskell2010
diff --git a/xmonad.hs b/xmonad.hs
index b26e45c..e77f0eb 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -2,23 +2,34 @@ import XMonad
2import XMonad.Config.Desktop 2import XMonad.Config.Desktop
3import XMonad.Layout.NoBorders 3import XMonad.Layout.NoBorders
4import XMonad.Layout.Tabbed 4import XMonad.Layout.Tabbed
5import XMonad.Layout.AvoidFloats
6import XMonad.Layout.Monitor
7import XMonad.Util.EZConfig (additionalKeys)
8import XMonad.Actions.PhysicalScreens
5 9
6main :: IO () 10main :: IO ()
7main = xmonad 11main = xmonad $ desktopConfig {
8 desktopConfig {
9 terminal = "xterm" 12 terminal = "xterm"
10-- , layoutHook = noBorders Full ||| noBorders (tabbed shrinkText def) ||| layoutHook desktopConfig
11 , layoutHook = desktopLayoutModifiers layouts 13 , layoutHook = desktopLayoutModifiers layouts
12 , modMask = mod4Mask 14 , modMask = theModMask
13 } 15 } `additionalKeys` myKeys
14 16
15 where 17 where
16 18
19 theModMask = mod4Mask
20 modm = theModMask
21
22 myKeys = [((theModMask, xK_u ), broadcastMessage ToggleMonitor >> refresh)] ++ fixScreenOrder
23
24 fixScreenOrder = [((modm .|. mask, key), f sc) | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..],
25 (f, mask) <- [(viewScreen def, 0), (sendToScreen def, shiftMask)]]
26
17 layouts = noBorders Full 27 layouts = noBorders Full
18 ||| noBorders (tabbed shrinkText def) 28 ||| noBorders (tabbed shrinkText def)
19 ||| smartBorders tiled 29 ||| smartBorders tiled
20 ||| smartBorders (Mirror tiled) 30 ||| smartBorders (Mirror tiled)
21 tiled = Tall nmaster delta ratio 31 tiled = avoidFloats $ Tall nmaster delta ratio
22 nmaster = 1 -- The default number of windows in the master pane 32 nmaster = 1 -- The default number of windows in the master pane
23 ratio = 1 / 2 -- Default proportion of screen occupied by master pane 33 ratio = 2 / 3 -- Default proportion of screen occupied by master pane
24 delta = 3 / 100 -- Percent of screen to increment by when resizing panes 34 delta = 3 / 100 -- Percent of screen to increment by when resizing panes
35