Created
February 1, 2015 13:32
-
-
Save teodanciu/540b32e239fbea14f93d to your computer and use it in GitHub Desktop.
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 XMonad | |
import XMonad.Config.Gnome | |
import XMonad.Hooks.SetWMName | |
import qualified Data.Map as M | |
import Graphics.X11.Xlib | |
import Data.Ratio | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ICCCMFocus | |
import XMonad.Hooks.SetWMName | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Layout.NoBorders | |
import XMonad.Prompt | |
import XMonad.Prompt.Shell | |
import XMonad.Prompt.XMonad | |
import qualified XMonad.StackSet as W | |
main = xmonad gnomeConfig { | |
modMask = mod4Mask, | |
terminal = "gnome-terminal", | |
manageHook = myManageHook, | |
startupHook = setWMName "LG3D", | |
layoutHook = smartBorders $ layoutHook gnomeConfig, | |
keys = myKeys | |
} | |
myKeys x = M.union (keys defaultConfig x) (M.fromList (myKeysConfig x)) | |
myKeysConfig conf@(XConfig { | |
XMonad.modMask = mod4Mask | |
}) = [ | |
-- launch dmenu | |
((mod4Mask, xK_p), spawn "dmenu_run") | |
-- ((mod4Mask, xK_F12), xmonadPrompt defaultXPConfig), | |
-- ((mod4Mask, xK_F3 ), shellPrompt defaultXPConfig) | |
] | |
++ | |
-- mod-shift-[1..9] %! Move client to workspace N | |
[((m .|. mod4Mask, k), windows $ f i) | |
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] | |
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] | |
++ | |
-- mod-{w,e,r} %! Switch to physical/Xinerama screens 1, 2, or 3 | |
-- mod-shift-{w,e,r} %! Move client to screen 1, 2, or 3 | |
[((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | |
| (key, sc) <- zip [xK_w, xK_e, xK_o] [0..] | |
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] | |
myManageHook = composeAll | |
[manageHook gnomeConfig, | |
--isFullscreen --> doFullFloat, | |
title =? "Application Finder" --> doCenterFloat | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment