diff options
Diffstat (limited to 'xmonad.hs')
-rw-r--r-- | xmonad.hs | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/xmonad.hs b/xmonad.hs new file mode 100644 index 0000000..62965d1 --- /dev/null +++ b/xmonad.hs @@ -0,0 +1,68 @@ +import XMonad +import XMonad.Config.Desktop +import XMonad.Config.Gnome +import XMonad.Actions.CycleWS +import XMonad.Actions.NoBorders +import XMonad.Hooks.ManageDocks +import XMonad.Hooks.ManageHelpers +import qualified XMonad.StackSet as W +import XMonad.Util.EZConfig + +import Control.Monad +import Control.Monad.Trans +import Data.Monoid + +import ConfigurableBorders +import FullscreenManager +import NoBorders + + +main = xmonad $ gnomeConfig + { modMask = mod4Mask -- set the mod key to the windows key + , manageHook = myManageHook + , layoutHook = desktopLayoutModifiers myLayoutHook + , startupHook = myStartupHook + , handleEventHook = handleFullscreen + } + `additionalKeysP` + [ ("M-<Left>", prevWS ) + , ("M-<Right>", nextWS ) + , ("M-S-<Left>", shiftToPrev ) + , ("M-S-<Right>", shiftToNext ) + , ("M-S-b", withFocused toggleBorder >> refresh) + , ("M1-<F4>", kill) + ] + + +myStartupHook :: X () +myStartupHook = do + startupHook gnomeConfig + spawn "xcompmgr" + +myManageHook :: ManageHook +myManageHook = composeAll + [ composeOne + [ className =? "Guake.py" -?> (doFloatMaybeFullscreen <+> doConfigBorderOff) + , className =? "Do" -?> (doFloat <+> doConfigBorderOff) + , className =? "MPlayer" -?> doCenterFloat + , className =? "Gimp" -?> doFloat + , className =? "Gajim.py" -?> doFloat + , isFullscreen -?> doFullscreen + ] + , manageHook gnomeConfig + ] + + +myLayoutHook = manageFullscreen $ configureBorders $ smartBorders (tiled ||| Mirror tiled ||| Full) + where + -- default tiling algorithm partitions the screen into two panes + tiled = Tall nmaster delta ratio + + -- The default number of windows in the master pane + nmaster = 1 + + -- Default proportion of screen occupied by master pane + ratio = 1/2 + + -- Percent of screen to increment by when resizing panes + delta = 3/100 |