annotate .xmonad/xmonad.hs @ 439:2325dea339ca

smailq: vendor script to ease handling outgoing mail From commit 5b83ca873f1dc9117a9b3590f0aa07fe2806fce9 of http://git.sthu.org/repos/smailq.git - documented at https://www.sthu.org/code/smailq.html.
author Augie Fackler <raf@durin42.com>
date Sat, 15 Jul 2017 12:57:17 -0400
parents 64e73453e43f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
176
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 import XMonad
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
2
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
3 import XMonad
249
fed8445581bb xmonad: gnome-friendly configuration
Augie Fackler <durin42@gmail.com>
parents: 196
diff changeset
4 import XMonad.Config.Gnome
196
4481fb6c3dfe xmonad: tweak layout to include xmobar
Augie Fackler <durin42@gmail.com>
parents: 181
diff changeset
5 import XMonad.Hooks.ManageDocks
266
93a8f55a4e30 xmonad: add takeTopFocus logHook
Augie Fackler <durin42@gmail.com>
parents: 249
diff changeset
6 import XMonad.Hooks.ICCCMFocus
176
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
7 import XMonad.Layout
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
8 import XMonad.Layout.Column
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
9 import XMonad.Layout.LayoutBuilder
181
2d8105525973 xmonad: add another layout, fix terminal colors, add screensaver lock binding
Augie Fackler <durin42@gmail.com>
parents: 176
diff changeset
10 import XMonad.Util.EZConfig
196
4481fb6c3dfe xmonad: tweak layout to include xmobar
Augie Fackler <durin42@gmail.com>
parents: 181
diff changeset
11 import XMonad.Util.Run(spawnPipe)
176
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
12
325
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
13 myLayout = (augieLayout 2) ||| (augieLayout 1) ||| Full
176
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
14
325
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
15 augieLayout num = layoutN num mainBox (Just overflowBox) layout overflowLayout
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
16 where
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
17 mainBox = relBox 0 0 1 mainHeightFrac
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
18 overflowBox = relBox 0 0 1 1
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
19 layout = Tall 1 0.03 mainWidthFrac
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
20 overflowLayout = layoutAll (relBox 0 mainHeightFrac 1 1) singleRow
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
21 mainHeightFrac = 0.75 -- main area takes up this much screen height
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
22 mainWidthFrac = 0.75 -- main window takes up this much screen width
64e73453e43f xmonad: Pull apart custom layout into something readable
Lucas Bergman <lucas@bergmans.us>
parents: 266
diff changeset
23 singleRow = Mirror $ Column 1
176
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
24
249
fed8445581bb xmonad: gnome-friendly configuration
Augie Fackler <durin42@gmail.com>
parents: 196
diff changeset
25 myDmenuTitleBar =
fed8445581bb xmonad: gnome-friendly configuration
Augie Fackler <durin42@gmail.com>
parents: 196
diff changeset
26 "exec `dmenu_path | dmenu\
fed8445581bb xmonad: gnome-friendly configuration
Augie Fackler <durin42@gmail.com>
parents: 196
diff changeset
27 \ -p 'Run:'`"
fed8445581bb xmonad: gnome-friendly configuration
Augie Fackler <durin42@gmail.com>
parents: 196
diff changeset
28
176
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
29 main :: IO ()
196
4481fb6c3dfe xmonad: tweak layout to include xmobar
Augie Fackler <durin42@gmail.com>
parents: 181
diff changeset
30 main = do
249
fed8445581bb xmonad: gnome-friendly configuration
Augie Fackler <durin42@gmail.com>
parents: 196
diff changeset
31 xmonad $ gnomeConfig
181
2d8105525973 xmonad: add another layout, fix terminal colors, add screensaver lock binding
Augie Fackler <durin42@gmail.com>
parents: 176
diff changeset
32 { terminal = "urxvt -sr -bg Black -fg White"
176
842607bbc090 Add xmonad configuration file.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
33 , modMask = mod4Mask
196
4481fb6c3dfe xmonad: tweak layout to include xmobar
Augie Fackler <durin42@gmail.com>
parents: 181
diff changeset
34 , layoutHook = avoidStruts myLayout
266
93a8f55a4e30 xmonad: add takeTopFocus logHook
Augie Fackler <durin42@gmail.com>
parents: 249
diff changeset
35 , logHook = takeTopFocus
181
2d8105525973 xmonad: add another layout, fix terminal colors, add screensaver lock binding
Augie Fackler <durin42@gmail.com>
parents: 176
diff changeset
36 } `additionalKeys` [
2d8105525973 xmonad: add another layout, fix terminal colors, add screensaver lock binding
Augie Fackler <durin42@gmail.com>
parents: 176
diff changeset
37 ((mod4Mask, xK_a), spawn "gnome-screensaver-command --lock")
249
fed8445581bb xmonad: gnome-friendly configuration
Augie Fackler <durin42@gmail.com>
parents: 196
diff changeset
38 , ((mod4Mask, xK_p), spawn myDmenuTitleBar)
181
2d8105525973 xmonad: add another layout, fix terminal colors, add screensaver lock binding
Augie Fackler <durin42@gmail.com>
parents: 176
diff changeset
39 ]