upgraded to xmonad 0.17
parent
a3885acc8d
commit
b6464fd9dd
|
@ -54,9 +54,17 @@ let
|
||||||
pamixer = "${pkgs.pamixer}/bin/pamixer";
|
pamixer = "${pkgs.pamixer}/bin/pamixer";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
xsession.windowManager.xmonad = {
|
xsession.windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
|
haskellPackages = pkgs.haskellPackages.override {
|
||||||
|
overrides = self: super: {
|
||||||
|
xmonad = self.xmonad_0_17_0;
|
||||||
|
xmonad-contrib = self.xmonad_0_17_0;
|
||||||
|
xmonad-extras = self.xmonad-extras_0_17_0;
|
||||||
|
};
|
||||||
|
};
|
||||||
extraPackages = haskellPackages: [
|
extraPackages = haskellPackages: [
|
||||||
haskellPackages.monad-logger
|
haskellPackages.monad-logger
|
||||||
haskellPackages.dbus
|
haskellPackages.dbus
|
||||||
|
|
|
@ -32,7 +32,8 @@ import XMonad.Layout.MultiToggle ( Toggle (Toggle) )
|
||||||
import XMonad.Layout.BoringWindows ( focusUp , focusDown )
|
import XMonad.Layout.BoringWindows ( focusUp , focusDown )
|
||||||
import XMonad.Layout.Maximize ( maximizeRestore )
|
import XMonad.Layout.Maximize ( maximizeRestore )
|
||||||
import XMonad.Actions.CopyWindow ( kill1 )
|
import XMonad.Actions.CopyWindow ( kill1 )
|
||||||
import XMonad.Actions.FloatKeys ( keysResizeWindow, keysMoveWindow )
|
-- import XMonad.Actions.FloatKeys ( keysResizeWindow, keysMoveWindow, ChangeDim )
|
||||||
|
import XMonad.Actions.FloatKeys
|
||||||
import XMonad.Actions.Navigation2D ( switchLayer , windowGo , windowSwap )
|
import XMonad.Actions.Navigation2D ( switchLayer , windowGo , windowSwap )
|
||||||
import XMonad.Hooks.ManageHelpers ( doRectFloat )
|
import XMonad.Hooks.ManageHelpers ( doRectFloat )
|
||||||
|
|
||||||
|
@ -103,6 +104,7 @@ import XMonad.Operations
|
||||||
, mouseResizeWindow
|
, mouseResizeWindow
|
||||||
, mouseMoveWindow
|
, mouseMoveWindow
|
||||||
, focus
|
, focus
|
||||||
|
, D
|
||||||
)
|
)
|
||||||
|
|
||||||
import XMonad.StackSet
|
import XMonad.StackSet
|
||||||
|
@ -295,43 +297,51 @@ wmBinds conf@XConfig {modMask = modm} = M.fromList
|
||||||
doIt = runQuery $ doRectFloat rect
|
doIt = runQuery $ doRectFloat rect
|
||||||
rect = RationalRect 0.05 0.05 0.9 0.9
|
rect = RationalRect 0.05 0.05 0.9 0.9
|
||||||
|
|
||||||
floatResize = M.fromList
|
resize :: M.Map [Char] (X())
|
||||||
[ ("L", (-n, 0))
|
resize = M.intersectionWith onFloat flt tilling
|
||||||
, ("R", (n, 0))
|
|
||||||
, ("D", (0, n))
|
|
||||||
, ("U", (0, -n))
|
|
||||||
]
|
|
||||||
tillingResize = M.fromList
|
|
||||||
[ ("L", sendMessage Shrink)
|
|
||||||
, ("R", sendMessage Expand)
|
|
||||||
, ("D", sendMessage MirrorShrink)
|
|
||||||
, ("U", sendMessage MirrorExpand)
|
|
||||||
]
|
|
||||||
tillingMove = M.fromList
|
|
||||||
[ ("L", L)
|
|
||||||
, ("R", R)
|
|
||||||
, ("D", D)
|
|
||||||
, ("U", U)
|
|
||||||
]
|
|
||||||
incDec = M.fromList
|
|
||||||
[ ("+", (n,n))
|
|
||||||
, ("-", (-n,-n))
|
|
||||||
]
|
|
||||||
n = 10
|
|
||||||
|
|
||||||
resize = M.union lrdu chSize
|
|
||||||
where
|
where
|
||||||
flt = fmap (\x -> keysResizeWindow x (0,0)) floatResize
|
|
||||||
lrdu = M.intersectionWith onFloat flt tillingResize
|
|
||||||
chSize = fmap (g . f) incDec
|
|
||||||
where
|
|
||||||
f x = keysResizeWindow x (1%2,1%2)
|
|
||||||
g x = onFloat x $ return ()
|
|
||||||
|
|
||||||
|
flt :: M.Map [Char] (Window -> X())
|
||||||
|
flt = M.fromList
|
||||||
|
[ ("L", keysResizeWindow (-n, 0) (0, 0))
|
||||||
|
, ("R", keysResizeWindow ( n, 0) (0, 0))
|
||||||
|
, ("D", keysResizeWindow ( 0, n) (0, 0))
|
||||||
|
, ("U", keysResizeWindow ( 0, -n) (0, 0))
|
||||||
|
, ("+", keysResizeWindow ( n, n) (1%2, 1%2))
|
||||||
|
, ("-", keysResizeWindow (-n, -n) (1%2, 1%2))
|
||||||
|
]
|
||||||
|
|
||||||
|
tilling :: M.Map [Char] (X())
|
||||||
|
tilling = M.fromList
|
||||||
|
[ ("L", sendMessage Shrink)
|
||||||
|
, ("R", sendMessage Expand)
|
||||||
|
, ("D", sendMessage MirrorShrink)
|
||||||
|
, ("U", sendMessage MirrorExpand)
|
||||||
|
, ("+", return ())
|
||||||
|
, ("-", return ())
|
||||||
|
]
|
||||||
|
n = 10
|
||||||
|
|
||||||
|
move :: M.Map [Char] (X())
|
||||||
move = M.intersectionWith onFloat flt tilling
|
move = M.intersectionWith onFloat flt tilling
|
||||||
where
|
where
|
||||||
flt = fmap keysMoveWindow floatResize
|
|
||||||
tilling = fmap (`windowSwap` False) tillingMove
|
flt :: M.Map [Char] (Window -> X())
|
||||||
|
flt = M.fromList
|
||||||
|
[ ("L", keysMoveWindow (-n, 0))
|
||||||
|
, ("R", keysMoveWindow ( n, 0))
|
||||||
|
, ("D", keysMoveWindow ( 0, n))
|
||||||
|
, ("U", keysMoveWindow ( 0, -n))
|
||||||
|
]
|
||||||
|
|
||||||
|
tilling :: M.Map [Char] (X())
|
||||||
|
tilling = M.fromList
|
||||||
|
[ ("L", windowSwap L False)
|
||||||
|
, ("R", windowSwap R False)
|
||||||
|
, ("D", windowSwap D False)
|
||||||
|
, ("U", windowSwap U False)
|
||||||
|
]
|
||||||
|
n = 10
|
||||||
|
|
||||||
onFloat a b = withFocused $ ifFloat a (const b)
|
onFloat a b = withFocused $ ifFloat a (const b)
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in New Issue