diff options
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | lib/FullscreenManager.hs | 2 | ||||
-rw-r--r-- | xmonad.hs | 29 |
3 files changed, 26 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ee6844f --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*~ +*.o +*.hi +xmonad.errors +xmonad-i386-linux diff --git a/lib/FullscreenManager.hs b/lib/FullscreenManager.hs index ac1907f..95a6ff2 100644 --- a/lib/FullscreenManager.hs +++ b/lib/FullscreenManager.hs @@ -85,7 +85,7 @@ instance LayoutModifier FullscreenManager Window where -isFloating :: Window -> X (Bool) +isFloating :: Window -> X Bool isFloating w = gets windowset >>= \ws -> return $ M.member w (W.floating ws) @@ -5,6 +5,7 @@ import XMonad.Actions.CycleWS import XMonad.Actions.NoBorders import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers +import XMonad.Layout.ResizableTile import qualified XMonad.StackSet as W import XMonad.Util.EZConfig @@ -17,27 +18,37 @@ import FullscreenManager import NoBorders +myModMask = mod4Mask + main = xmonad $ gnomeConfig - { modMask = mod4Mask -- set the mod key to the windows key + { modMask = myModMask , manageHook = myManageHook , layoutHook = desktopLayoutModifiers myLayoutHook , startupHook = myStartupHook , handleEventHook = myEventHook } `additionalKeysP` - [ ("M-<Left>", prevWS ) - , ("M-<Right>", nextWS ) - , ("M-S-<Left>", shiftToPrev ) - , ("M-S-<Right>", shiftToNext ) + [ ("M-a", sendMessage MirrorShrink) + , ("M-y", sendMessage MirrorExpand) + , ("M-<Left>", prevWS) + , ("M-<Right>", nextWS) + , ("M-S-<Left>", shiftToPrev) + , ("M-S-<Right>", shiftToNext) , ("M-S-b", withFocused toggleBorder >> refresh) , ("M1-<F4>", kill) ] + `additionalMouseBindings` + [ ((myModMask, button4), \_ -> sendMessage Shrink) + , ((myModMask, button5), \_ -> sendMessage Expand) + , ((myModMask .|. shiftMask, button4), \_ -> sendMessage MirrorExpand) + , ((myModMask .|. shiftMask, button5), \_ -> sendMessage MirrorShrink) + ] myStartupHook :: X () myStartupHook = do startupHook gnomeConfig - spawn "xcompmgr" + spawn "killall -u `id -un` -q xcompmgr; exec xcompmgr" myManageHook :: ManageHook myManageHook = composeAll @@ -53,16 +64,16 @@ myManageHook = composeAll ] -myLayoutHook = manageFullscreen $ configureBorders $ smartBorders (tiled ||| Mirror tiled ||| Full) +myLayoutHook = manageFullscreen $ configureBorders $ smartBorders (tiled ||| Mirror tiled ||| Full) where -- default tiling algorithm partitions the screen into two panes - tiled = Tall nmaster delta ratio + tiled = ResizableTall 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 + ratio = 3/5 -- Percent of screen to increment by when resizing panes delta = 3/100 |