Mercurial > dotfiles
annotate .xmonad/xmonad.hs @ 336:ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
I've been toting around this package.el from 2009 or so, and something
in the package format seems to have changed that broke me. Thanks to
some related diagnostics by Lucas, I've grabbed the last package.el
that worked with emacs 23 and stashed it here. This seems to work,
modulo some things (notably js2-mode and smex) now seem to require
emacs 24 if you install them using package.el, so this will end up
being brittle on my last couple of emacs23 machines.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 29 May 2014 14:30:42 -0400 |
parents | 64e73453e43f |
children |
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 ] |