guest@dotshare [~/groups/wms/xmonad] $ ls caminoix/ | cat

caminoix (scrot, raw, dl) (+1 likes)

caminoix Jun 25, 2011 (wms/xmonad)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
import qualified XMonad.StackSet as W

import System.IO (hPutStrLn)
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.ResizableTile
import XMonad.Util.EZConfig (additionalKeys, additionalKeysP)
import XMonad.Util.Loggers (logCmd)
import XMonad.Util.Run (spawnPipe)


main = do
	statBarPipe <- spawnPipe myStateBar
	xmonad $ defaultConfig
	-- xmonad $ gnomeConfig
		{ -- hooks
		  layoutHook	= myLayoutHook
		, logHook		= dynamicLogWithPP $ myStateBarPP statBarPipe
		, manageHook	= manageDocks <+> myManageHook <+> manageHook defaultConfig
		, startupHook	= myStartupHook
		  -- keys & mouse
		, modMask		= mod4Mask
		  -- look
		, borderWidth	= 2
		, focusedBorderColor	= myColFgUrgent
		, normalBorderColor		= myColBgNormal
		  -- workspaces
		, workspaces	= ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
		} `additionalKeysP` myKeys `additionalKeys`
			[ ((0, 0x1008ff11), spawn "amixer -q set Master 5%- unmute")
			, ((0, 0x1008ff12), spawn "amixer -q set Master mute")
			, ((0, 0x1008ff13), spawn "amixer -q set Master 5%+ unmute")
			]

-- alternates
-- apps
-- myBrowser		= "google-chrome --enable-extensions --enable-plugins --enable-remote-fonts --enable-user-scripts"
myBrowser		= "chromium --enable-greasemonkey"
myPdfViewer		= "evince"
myRunner		= "exe=`dmenu_path | dmenu -b -nb '"++ myColBgNormal ++ "' -nf '" ++ myColFgNormal ++ "' -fn '" ++ myFont ++ "' -p '$'` && eval \"exec $exe\""
myRunnerRoot	= "exe=`dmenu_path | dmenu -b -nb '"++ myColBgNormal ++ "' -nf '" ++ myColFgNormal ++ "' -sb '" ++ myColFgUrgent ++ "' -fn '" ++ myFont ++ "' -p '#'` && eval \"exec sudo $exe\""
myStateBar		= "dzen2 -bg '" ++ myColBgNormal ++ "' -fn '" ++ myFont ++ "' -ta l -w 720 -h 24"
myTerminal		= "sakura"
myTextEditor	= "libreoffice"
-- look
myColBgNormal	= "#2a2b2f"
myColFgFocus	= "#62acce"
myColFgNormal	= "#e1e0e5"
myColFgUnimp	= "#67686b"
myColFgUrgent	= "#e6ac32"
myFont			= "-*-dax-light-r-normal-*-17-*-*-*-p-*-iso8859-1"


-- config
myKeys =
	[ -- xmonad
	  ("M-<F1>", spawn myRunner)
	, ("M-<F3>", spawn myRunnerRoot)
	, ("M-f", withFocused $ windows . W.sink)
	, ("M-q", kill)
	, ("M-s", spawn "/home/kamil/.dzen/dzen-stats.sh")
	, ("M-S-r", restart "xmonad" True)
	  -- apps
	, ("M-b", spawn myBrowser)
	, ("M-m", spawn (myBrowser ++ " www.gmail.com"))
	, ("M-p", spawn myPdfViewer)
	, ("M-t", spawn myTextEditor)
	, ("M-<Return>", spawn myTerminal)
	  -- xkb
	, ("M-`", spawn "/home/kamil/conf/kbd/layout_switcher.sh often")
	, ("M-S-`", spawn "/home/kamil/conf/kbd/layout_switcher.sh menu")
	]

myLayoutHook = avoidStruts (resizableTall ||| resizableWide) where
	resizableTall	= ResizableTall 1 (3/100) (1/2) []
	resizableWide	= ResizableTall 2 (3/100) (1/2) []

myManageHook = composeAll
	[ className =? "Do"				--> doIgnore
	, className	=? "Gimp"			--> doFloat
	, className =? "stalonetray"	--> doIgnore
	-- download windows
	, className =? "Download"		--> doShift "nine"
	-- dialogs
	, stringProperty "WM_WINDOW_TYPE"	=? "_NET_WIM_WINDOW_TYPE_DIALOG" --> doFloat
	-- fontforge
	, stringProperty "WM_NAME"			=? "Layers"	--> doFloat
	, stringProperty "WM_NAME"			=? "Tools"	--> doFloat
	]

myStartupHook = do
	spawn "sudo /sbin/bootchartd stop"

myStateBarPP handle = defaultPP
	{ -- content
	  ppExtras	= []
	, ppOrder	= \(ws:l:t:e) -> [ws] ++ e
	  -- look
	, ppCurrent	= dzenColor myColFgFocus ""
	, ppHidden	= dzenColor myColFgNormal ""
	, ppOutput	= hPutStrLn handle
	, ppSep		= " | "
	, ppUrgent	= dzenColor myColFgUrgent ""
	}

CLICK TO VIEW

x

Notes

Some useful ideas and hacks.