Created
February 20, 2013 00:48
-
-
Save Tritlo/4991702 to your computer and use it in GitHub Desktop.
My current xmonad.hs
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 | |
--Fyrir gnomepanel | |
import XMonad.Config.Gnome | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import System.IO | |
import XMonad.Hooks.DynamicLog | |
--laga matlab | |
import XMonad.Hooks.SetWMName | |
--Keys | |
import qualified Data.Map as M | |
import qualified XMonad.StackSet as W | |
import XMonad.Prompt | |
import XMonad.Layout.PerWorkspace (onWorkspace) | |
import XMonad.Actions.DynamicWorkspaces | |
import XMonad.Actions.CopyWindow | |
import Data.Ratio | |
import XMonad.Layout.SimplestFloat | |
import XMonad.Layout.Tabbed | |
import XMonad.Layout.Spiral | |
import XMonad.Layout.Grid | |
--Cycle | |
import XMonad.Actions.CycleWS | |
--Skipum nofnum | |
wspaces = ["1","2","3","4","5","6","7","8","9"] | |
gridLayout = Grid | |
spiralLayout = spiral (1 % 1) | |
myLayout = onWorkspace "grid" gridLayout $ onWorkspace "spiral" spiralLayout $ onWorkspace "tabs" simpleTabbed $ onWorkspace "float" simplestFloat $ layoutHook gnomeConfig | |
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList | |
( | |
[ | |
((modm, xK_p), (spawn "dmenu_run")) | |
, ((modm, xK_c), (spawn "chromium-browser")) | |
, ((modm, xK_f), (spawn "firefox -new-window")) | |
, ((modm, xK_i), removeEmptyWorkspaceAfterExcept wspaces (moveTo Prev HiddenWS)) | |
, ((modm, xK_o), removeEmptyWorkspaceAfterExcept wspaces (moveTo Next HiddenWS)) | |
, ((modm .|. shiftMask, xK_i), removeEmptyWorkspaceAfterExcept wspaces (shiftTo Prev HiddenWS)) | |
, ((modm .|. shiftMask, xK_o), removeEmptyWorkspaceAfterExcept wspaces (shiftTo Next HiddenWS)) | |
, ((modm, xK_a), removeEmptyWorkspaceAfterExcept wspaces toggleWS) | |
, ((modm .|. shiftMask, xK_BackSpace), removeWorkspace) | |
, ((modm .|. shiftMask, xK_v), selectWorkspace defaultXPConfig) | |
, ((modm, xK_m), withWorkspace defaultXPConfig (windows . W.shift)) | |
, ((modm .|. shiftMask, xK_m), withWorkspace defaultXPConfig (windows . copy)) | |
, ((modm .|. shiftMask, xK_r), renameWorkspace defaultXPConfig) | |
, ((modm .|. shiftMask, xK_c), kill1) | |
] | |
++ | |
zip (zip (repeat (modm)) [xK_1..xK_9]) (map (withNthWorkspace W.greedyView) [0..]) | |
++ | |
zip (zip (repeat (modm .|. shiftMask)) [xK_1..xK_9]) (map (withNthWorkspace W.shift) [0..]) | |
) | |
myManageHook = composeAll | |
[ manageHook gnomeConfig | |
, className =? "Unity-2d-panel" --> doIgnore | |
] | |
main = do | |
xmproc <- spawnPipe "/home/tritlo/.cabal/bin/xmobar /home/tritlo/.xmobarrc" | |
xmonad gnomeConfig { manageHook = manageDocks <+> myManageHook, | |
keys = myKeys <+> keys gnomeConfig, | |
layoutHook = avoidStruts $ myLayout, | |
XMonad.workspaces = wspaces, | |
startupHook = setWMName "LG3D", | |
modMask = mod4Mask, | |
logHook = dynamicLogString defaultPP >>= xmonadPropLog | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment