Add XMonad config
This commit is contained in:
parent
ba12781a86
commit
de0ac7e06e
4 changed files with 62 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
||||||
export DESTDIR:=$(HOME)
|
export DESTDIR:=$(HOME)
|
||||||
modules=.emacs.d .config .conkerorrc .local .moc .mutt .ncmpcpp \
|
modules=.emacs.d .config .conkerorrc .local .moc .mutt .ncmpcpp \
|
||||||
.pentadactyl .sawfish .ssh .w3m .weechat .zsh
|
.pentadactyl .sawfish .ssh .w3m .weechat .zsh xmonad
|
||||||
objects=.bash_profile .beetsconfig .conky_box.lua .conkyrc .gitconfig \
|
objects=.bash_profile .beetsconfig .conky_box.lua .conkyrc .gitconfig \
|
||||||
.guile .hgrc .offlineimap.py .offlineimaprc .screenrc .scwmrc \
|
.guile .hgrc .offlineimap.py .offlineimaprc .screenrc .scwmrc \
|
||||||
.slrnrc .stumpwmrc .tmux.conf .urlview .xbindkeysrc.scm .Xdefaults \
|
.slrnrc .stumpwmrc .tmux.conf .urlview .xbindkeysrc.scm .Xdefaults \
|
||||||
|
|
3
xmonad/.gitignore
vendored
Normal file
3
xmonad/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
*.o
|
||||||
|
xmonad-x86_64-linux
|
||||||
|
xmonad.hi
|
10
xmonad/Makefile
Normal file
10
xmonad/Makefile
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
DESTDIR := $(DESTDIR)/.xmonad
|
||||||
|
objects=xmonad-x86_64-linux xmonad.hs
|
||||||
|
|
||||||
|
GHC := ghc
|
||||||
|
|
||||||
|
include ../dotfiles.mk
|
||||||
|
|
||||||
|
xmonad-x86_64-linux: xmonad.hs
|
||||||
|
$(GHC) --make $^ -i -ilib -fforce-recomp -main-is main -v0 -o $@
|
||||||
|
install-xmonad-x86_64-linux: MODE=744
|
48
xmonad/xmonad.hs
Normal file
48
xmonad/xmonad.hs
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
--
|
||||||
|
-- It overrides a few basic settings, reusing all other defaults.
|
||||||
|
--
|
||||||
|
|
||||||
|
import XMonad
|
||||||
|
import XMonad.Actions.WindowGo
|
||||||
|
import XMonad.Hooks.FadeInactive
|
||||||
|
import XMonad.Hooks.ManageDocks
|
||||||
|
import XMonad.Hooks.ManageHelpers
|
||||||
|
import XMonad.Util.EZConfig
|
||||||
|
|
||||||
|
import qualified XMonad.StackSet as W
|
||||||
|
|
||||||
|
myLogHook :: X ()
|
||||||
|
myLogHook = fadeOutLogHook fadeRules
|
||||||
|
|
||||||
|
fadeRules :: Query Rational
|
||||||
|
fadeRules = do
|
||||||
|
fullscreen <- isFullscreen
|
||||||
|
conkeror <- className =? "Conkeror"
|
||||||
|
return $ case () of _ | fullscreen -> 1
|
||||||
|
| conkeror -> 0.95
|
||||||
|
| otherwise -> 0.9
|
||||||
|
|
||||||
|
main = xmonad $ defaultConfig
|
||||||
|
{ terminal = "urxvt"
|
||||||
|
, focusFollowsMouse = False
|
||||||
|
, clickJustFocuses = False
|
||||||
|
, modMask = mod4Mask
|
||||||
|
, layoutHook = avoidStruts $ layoutHook defaultConfig
|
||||||
|
, logHook = myLogHook
|
||||||
|
, manageHook = manageHook defaultConfig <+> manageDocks }
|
||||||
|
`additionalKeysP`
|
||||||
|
[
|
||||||
|
("C-z ,", screenWorkspace 0 >>= flip whenJust (windows . W.view)),
|
||||||
|
("C-z .", screenWorkspace 1 >>= flip whenJust (windows . W.view)),
|
||||||
|
("C-z S-c", spawn "urxvt"),
|
||||||
|
("C-z S-e", spawn "emacsclient -ca emacs"),
|
||||||
|
("C-z c", runOrRaiseNext "urxvt" (className =? "URxvt")),
|
||||||
|
("C-z e", runOrRaiseNext "emacsclient -ca emacs" (className =? "Emacs")),
|
||||||
|
("C-z w", runOrRaiseNext "conkeror" (className =? "Conkeror")),
|
||||||
|
("M-S-1", spawn "dmenu_run"),
|
||||||
|
("M-n", windows W.focusDown),
|
||||||
|
("M-p", windows W.focusUp),
|
||||||
|
("M1-C-l", spawn "i3lock -c 000000")
|
||||||
|
]
|
||||||
|
`removeKeysP`
|
||||||
|
[ ("M-j"), ("M-k") ]
|
Loading…
Reference in a new issue