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)
|
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.Actions.NoBorders
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.ManageHelpers
|
import XMonad.Hooks.ManageHelpers
|
||||||
|
import XMonad.Layout.ResizableTile
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
import XMonad.Util.EZConfig
|
import XMonad.Util.EZConfig
|
||||||
|
|
||||||
|
@ -17,27 +18,37 @@ import FullscreenManager
|
||||||
import NoBorders
|
import NoBorders
|
||||||
|
|
||||||
|
|
||||||
|
myModMask = mod4Mask
|
||||||
|
|
||||||
main = xmonad $ gnomeConfig
|
main = xmonad $ gnomeConfig
|
||||||
{ modMask = mod4Mask -- set the mod key to the windows key
|
{ modMask = myModMask
|
||||||
, manageHook = myManageHook
|
, manageHook = myManageHook
|
||||||
, layoutHook = desktopLayoutModifiers myLayoutHook
|
, layoutHook = desktopLayoutModifiers myLayoutHook
|
||||||
, startupHook = myStartupHook
|
, startupHook = myStartupHook
|
||||||
, handleEventHook = myEventHook
|
, handleEventHook = myEventHook
|
||||||
}
|
}
|
||||||
`additionalKeysP`
|
`additionalKeysP`
|
||||||
[ ("M-<Left>", prevWS )
|
[ ("M-a", sendMessage MirrorShrink)
|
||||||
, ("M-<Right>", nextWS )
|
, ("M-y", sendMessage MirrorExpand)
|
||||||
, ("M-S-<Left>", shiftToPrev )
|
, ("M-<Left>", prevWS)
|
||||||
, ("M-S-<Right>", shiftToNext )
|
, ("M-<Right>", nextWS)
|
||||||
|
, ("M-S-<Left>", shiftToPrev)
|
||||||
|
, ("M-S-<Right>", shiftToNext)
|
||||||
, ("M-S-b", withFocused toggleBorder >> refresh)
|
, ("M-S-b", withFocused toggleBorder >> refresh)
|
||||||
, ("M1-<F4>", kill)
|
, ("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 :: X ()
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
startupHook gnomeConfig
|
startupHook gnomeConfig
|
||||||
spawn "xcompmgr"
|
spawn "killall -u `id -un` -q xcompmgr; exec xcompmgr"
|
||||||
|
|
||||||
myManageHook :: ManageHook
|
myManageHook :: ManageHook
|
||||||
myManageHook = composeAll
|
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
|
where
|
||||||
-- default tiling algorithm partitions the screen into two panes
|
-- 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
|
-- The default number of windows in the master pane
|
||||||
nmaster = 1
|
nmaster = 1
|
||||||
|
|
||||||
-- Default proportion of screen occupied by master pane
|
-- Default proportion of screen occupied by master pane
|
||||||
ratio = 1/2
|
ratio = 3/5
|
||||||
|
|
||||||
-- Percent of screen to increment by when resizing panes
|
-- Percent of screen to increment by when resizing panes
|
||||||
delta = 3/100
|
delta = 3/100
|
||||||
|
|
Reference in a new issue