Added mouse binding and changed layouts
This commit is contained in:
parent
a1af240919
commit
e2f3a13936
3 changed files with 26 additions and 10 deletions
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
*~
|
||||
*.o
|
||||
*.hi
|
||||
xmonad.errors
|
||||
xmonad-i386-linux
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
29
xmonad.hs
29
xmonad.hs
|
@ -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
|
||||
|
|
Reference in a new issue