Created
November 1, 2012 12:46
-
-
Save nomeaning777/3993434 to your computer and use it in GitHub Desktop.
xmonad memo
This file contains 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 System.Posix.Env (getEnv) | |
import Data.Maybe (maybe) | |
import XMonad | |
import XMonad.Config.Desktop | |
import XMonad.Config.Gnome | |
import XMonad.Config.Kde | |
import XMonad.Config.Xfce | |
import XMonad.Util.Run | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.EZConfig | |
import Control.Monad | |
import qualified XMonad.StackSet as W | |
myManageHookShift = composeAll | |
[ className =? "Opera" --> viewShift "2" | |
, className =? "Mikutter.rb" --> shift "3" | |
, className =? "Firefox" --> shift "2" | |
] | |
where viewShift = doF . liftM2 (.) W.view W.shift | |
shift = doF . W.shift | |
myManageHookFloat = composeAll | |
[ className =? "Uim-pref-gtk" --> doFloat ] | |
main = do | |
xmproc <- spawnPipe "xmobar" | |
xmonad $ defaultConfig | |
{ modMask = mod4Mask | |
, borderWidth = 2 | |
, normalBorderColor = "#99ccff" | |
, focusedBorderColor = "#0033dd" | |
, terminal = "gnome-terminal" | |
, manageHook = myManageHookFloat <+> myManageHookShift <+> manageDocks <+> manageHook defaultConfig | |
, layoutHook = avoidStruts $ layoutHook defaultConfig | |
, logHook = dynamicLogWithPP $ xmobarPP | |
{ ppOutput = hPutStrLn xmproc | |
, ppTitle = xmobarColor "green" "".shorten 50 | |
} | |
} | |
`additionalKeysP` | |
[ ("M-r", spawn "gmrun") | |
] | |
-- do | |
-- session <- getEnv "DESKTOP_SESSION" | |
-- xmonad $ maybe desktopConfig desktop session | |
-- desktop "gnome" = gnomeConfig | |
-- desktop "kde" = kde4Config | |
-- desktop "xfce" = xfceConfig | |
-- desktop "xmonad-gnome" = gnomeConfig | |
-- desktop _ = desktopConfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment