Created
June 9, 2012 16:04
-
-
Save temoto/2901615 to your computer and use it in GitHub Desktop.
my xmonad config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ xmonad --recompile | |
Error detected while loading xmonad configuration file: /home/temoto/.xmonad/xmonad.hs | |
xmonad.hs:81:54: | |
Couldn't match expected type `Data.Monoid.Endo WindowSet' | |
with actual type `()' | |
Expected type: X (Data.Monoid.Endo WindowSet) | |
Actual type: X () | |
In the first argument of `liftX', namely | |
`(withDisplay $ \ d -> io (lowerWindow d w))' | |
In the first argument of `(<+>)', namely | |
`liftX (withDisplay $ \ d -> io (lowerWindow d w))' | |
Please check the file for errors. | |
xmonad: xmessage: executeFile: does not exist (No such file or directory) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.Map as M | |
import qualified XMonad.StackSet as W | |
import System.Exit | |
import System.IO | |
import XMonad hiding ( (|||) ) | |
import XMonad.Actions.CycleWS | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Hooks.FadeInactive | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Hooks.SetWMName | |
import XMonad.Hooks.UrgencyHook | |
import XMonad.Layout.Gaps | |
import XMonad.Layout.IM | |
import XMonad.Layout.LayoutCombinators | |
import XMonad.Layout.NoBorders (smartBorders, noBorders) | |
import XMonad.Layout.PerWorkspace (onWorkspace) | |
import XMonad.Layout.Reflect (reflectHoriz) | |
import XMonad.Layout.ResizableTile | |
import XMonad.Layout.SimpleFloat | |
import XMonad.Layout.Spacing | |
import XMonad.Operations | |
import XMonad.Prompt | |
import XMonad.Prompt.AppendFile (appendFilePrompt) | |
import XMonad.Prompt.RunOrRaise (runOrRaisePrompt) | |
import XMonad.Util.EZConfig (additionalKeysP) | |
myConfig = ewmh defaultConfig | |
{ borderWidth = 1 | |
, focusFollowsMouse = True | |
, handleEventHook = fullscreenEventHook | |
, layoutHook = avoidStruts $ smartBorders $ myLayoutHook | |
, manageHook = manageDocks <+> myManageHook <+> manageHook defaultConfig | |
, modMask = mod4Mask | |
, terminal = "gnome-terminal" | |
, workspaces = myWorkspaces | |
} `additionalKeysP` myKeys | |
myWorkspaces = ["code", "web", "shell", "misc1", "irc", "im", "misc2"] | |
myKeys = | |
[ ("M4-`", toggleWS) -- Switch to the most recently vewed ws | |
, ("M4-r", runOrRaisePrompt myXPConfig) | |
, ("M4-<Backspace>", focusUrgent) | |
, ("M4-S-<Backspace>", clearUrgents) | |
] ++ | |
[ (otherModMasks ++ "M-" ++ [key], action tag) | |
| (tag, key) <- zip myWorkspaces "123456789" | |
, (otherModMasks, action) <- [ ("", windows . W.view) -- was W.greedyView | |
, ("S-", windows . W.shift)] | |
] | |
where | |
jumpToFull = sendMessage $ JumpToLayout "Hinted Full" | |
myXPConfig = defaultXPConfig | |
{ font = "xft: inconsolata-16" | |
, promptBorderWidth = 0 | |
, height = 32 | |
, historyFilter = deleteConsecutive | |
} | |
myLayoutHook = Full ||| Mirror tiled ||| tiled ||| onWorkspace "im" tiled Full | |
where | |
tiled = Tall nmaster delta ratio | |
nmaster = 1 | |
delta = 3 / 100 | |
ratio = 13 / 20 | |
myManageHook = composeOne . concat $ | |
[ [className =? c -?> doCenterFloat | c <- myFloatClasses] | |
, [className =? c -?> doShift "web" | c <- ["google-chrome"]] | |
, [className =? c -?> doShift "im" | c <- ["Pidgin"]] | |
, [resource =? r -?> doIgnore | r <- myIgnoreResources] | |
, [appName =? "conky" -?> ask >>= \w -> liftX (withDisplay $ \d -> io (lowerWindow d w)) <+> idHook] | |
-- Don't spawn new windows in the master pane (which is at the top of the | |
-- screen). Thanks to dschoepe, aavogt and especially vav in #xmonad on | |
-- Freenode (2009-06-30 02:10f CEST). | |
, [return True -?> doF avoidMaster] | |
-- Prevent windows which get moved to other workspaces from removing the | |
-- focus of the currently selected window. Thanks to vav in #xmonad on | |
-- Freenode (2010-04-15 21:04 CEST). | |
, [return True -?> doF W.focusDown] | |
] | |
where | |
myFloatClasses = ["Downloads", "Gxmessage", "MPlayer", "Nm-connection-editor" | |
, "Smplayer", "VirtualBox", "XFontSel", "Xmessage"] | |
myIgnoreResources = ["desktop", "desktop_window", "notify-osd", "stalonetray", "trayer"] | |
-- Avoid changing master on new window creation | |
avoidMaster :: W.StackSet i l a s sd -> W.StackSet i l a s sd | |
avoidMaster = W.modify' $ \c -> case c of | |
W.Stack t [] (r:rs) -> W.Stack t [r] rs | |
otherwise -> c | |
main = xmonad myConfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment