summaryrefslogtreecommitdiffstats
path: root/xmonad
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2009-10-16 09:31:33 +0200
committerStefan Ritter <xeno@thehappy.de>2009-10-16 09:31:33 +0200
commit3a336a8627c9075281f0ff8132a1b8057795aec1 (patch)
tree4fa65360e00055d281e7be70b5078aa423120a8b /xmonad
parentf018fe347183f6922692a788a8da49c459cd06e8 (diff)
Some clearance, more will follow
Diffstat (limited to 'xmonad')
-rw-r--r--xmonad/xmonad-0.7.hs87
-rw-r--r--xmonad/xmonad-0.8.hs73
2 files changed, 160 insertions, 0 deletions
diff --git a/xmonad/xmonad-0.7.hs b/xmonad/xmonad-0.7.hs
new file mode 100644
index 0000000..4a8443a
--- /dev/null
+++ b/xmonad/xmonad-0.7.hs
@@ -0,0 +1,87 @@
+import XMonad
+import System.Exit
+
+import qualified XMonad.StackSet as W
+import qualified Data.Map as M
+
+myTerminal = "x-terminal-emulator"
+myBorderWidth = 1
+myModMask = mod1Mask
+myNumlockMask = mod2Mask
+myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
+myNormalBorderColor = "#dddddd"
+myFocusedBorderColor = "#ff0000"
+
+myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
+ [ ((modMask, xK_Return), spawn $ XMonad.terminal conf)
+ , ((modMask, xK_q ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
+ , ((modMask, xK_l ), spawn "xscreensaver-command -lock")
+ , ((modMask .|. shiftMask, xK_c ), kill)
+ , ((modMask, xK_space ), sendMessage NextLayout)
+ , ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
+ , ((modMask, xK_r ), windows W.focusDown)
+ , ((modMask, xK_g ), windows W.focusUp )
+ , ((modMask, xK_m ), windows W.focusMaster )
+ , ((modMask .|. shiftMask, xK_r ), windows W.swapDown )
+ , ((modMask .|. shiftMask, xK_g ), windows W.swapUp )
+ , ((modMask, xK_n ), sendMessage Shrink)
+ , ((modMask, xK_t ), sendMessage Expand)
+ , ((modMask, xK_h ), withFocused $ windows . W.sink)
+ , ((modMask, xK_comma ), sendMessage (IncMasterN 1))
+ , ((modMask, xK_period), sendMessage (IncMasterN (-1)))
+ , ((modMask, xK_k ), spawn "amixer -c 0 set PCM 2dB+")
+ , ((modMask, xK_s ), spawn "amixer -c 0 set PCM 2dB-")
+ ]
+ ++
+
+ [((m .|. modMask, k), windows $ f i)
+ | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
+ , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
+
+myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
+ [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
+ , ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
+ , ((modMask, button3), (\w -> focus w >> mouseResizeWindow w))
+ ]
+
+myLayout = tiled ||| Mirror tiled ||| Full
+ where
+ tiled = Tall nmaster delta ratio
+ nmaster = 1
+ ratio = 55/100
+ delta = 1/100
+
+myManageHook = composeAll
+ [ className =? "MPlayer" --> doFloat
+ , className =? "Skype" --> doFloat
+ , className =? "Twinkle" --> doFloat
+ , className =? "VirtualBox" --> doFloat
+ , className =? "Gimp" --> doFloat
+ , className =? "Qemu-launcher" --> doFloat
+ , className =? "Default - Wine desktop" --> doFloat
+ ]
+
+myFocusFollowsMouse :: Bool
+myFocusFollowsMouse = True
+
+myLogHook = return ()
+
+main = xmonad defaults
+
+defaults = defaultConfig {
+ terminal = myTerminal,
+ focusFollowsMouse = myFocusFollowsMouse,
+ borderWidth = myBorderWidth,
+ modMask = myModMask,
+ numlockMask = myNumlockMask,
+ workspaces = myWorkspaces,
+ normalBorderColor = myNormalBorderColor,
+ focusedBorderColor = myFocusedBorderColor,
+
+ keys = myKeys,
+ mouseBindings = myMouseBindings,
+
+ layoutHook = myLayout,
+ manageHook = myManageHook,
+ logHook = myLogHook
+ }
diff --git a/xmonad/xmonad-0.8.hs b/xmonad/xmonad-0.8.hs
new file mode 100644
index 0000000..0ea6d0b
--- /dev/null
+++ b/xmonad/xmonad-0.8.hs
@@ -0,0 +1,73 @@
+import XMonad
+import XMonad.Hooks.ManageDocks
+import System.Exit
+
+import qualified XMonad.StackSet as W
+import qualified Data.Map as M
+
+myTerminal = "urxvt"
+myBorderWidth = 1
+myModMask = mod1Mask
+myNumlockMask = mod2Mask
+myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
+myNormalBorderColor = "#dddddd"
+myFocusedBorderColor = "#ff0000"
+myDefaultGaps = [(0,0,0,0)]
+
+myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
+ [ ((modMask, xK_Return), spawn $ XMonad.terminal conf)
+ , ((modMask, xK_q ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
+ , ((modMask, xK_l ), spawn "slock")
+ , ((modMask .|. shiftMask, xK_c ), kill)
+ , ((modMask, xK_space ), sendMessage NextLayout)
+ , ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
+ , ((modMask, xK_r ), windows W.focusDown)
+ , ((modMask, xK_g ), windows W.focusUp )
+ , ((modMask, xK_m ), windows W.focusMaster )
+ , ((modMask .|. shiftMask, xK_r ), windows W.swapDown )
+ , ((modMask .|. shiftMask, xK_g ), windows W.swapUp )
+ , ((modMask, xK_h ), withFocused $ windows . W.sink)
+ , ((modMask , xK_h ), sendMessage (IncMasterN 1))
+ , ((modMask , xK_f ), sendMessage (IncMasterN (-1)))
+ ]
+ ++
+
+ [((m .|. modMask, k), windows $ f i)
+ | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
+ , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
+
+myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
+ [ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
+ , ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
+ , ((modMask, button3), (\w -> focus w >> mouseResizeWindow w))
+ ]
+
+myManageHook = composeAll
+ [ className =? "MPlayer" --> doFloat
+ , className =? "Gimp" --> doFloat ]
+
+myFocusFollowsMouse :: Bool
+myFocusFollowsMouse = True
+
+myLogHook = return ()
+myStartupHook = return ()
+
+main = xmonad defaults
+
+defaults = defaultConfig {
+ manageHook = manageDocks <+> manageHook defaultConfig,
+ layoutHook = avoidStruts $ layoutHook defaultConfig,
+ terminal = myTerminal,
+ focusFollowsMouse = myFocusFollowsMouse,
+ borderWidth = myBorderWidth,
+ modMask = myModMask,
+ numlockMask = myNumlockMask,
+ workspaces = myWorkspaces,
+ normalBorderColor = myNormalBorderColor,
+ focusedBorderColor = myFocusedBorderColor,
+ defaultGaps = myDefaultGaps,
+ keys = myKeys,
+ mouseBindings = myMouseBindings,
+ logHook = myLogHook,
+ startupHook = myStartupHook
+ }