Snap floating windows on drop
parent
5e5c5464d3
commit
2e29cb8292
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import XMonad
|
import XMonad
|
||||||
import XMonad.Actions.CopyWindow (copyToAll, killAllOtherCopies)
|
import XMonad.Actions.CopyWindow (copyToAll, killAllOtherCopies)
|
||||||
|
import XMonad.Actions.FloatSnap
|
||||||
import XMonad.Hooks.DynamicProperty
|
import XMonad.Hooks.DynamicProperty
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
|
@ -215,7 +216,12 @@ zipKeyPrefixes prefixes keys = [prefix ++ key | prefix <- prefixes, key <- keys]
|
||||||
myRemoveKeys :: [String]
|
myRemoveKeys :: [String]
|
||||||
myRemoveKeys = "M-S-q" : zipKeyPrefixes ["M-", "M-S-"] (map show [ 1..5 ])
|
myRemoveKeys = "M-S-q" : zipKeyPrefixes ["M-", "M-S-"] (map show [ 1..5 ])
|
||||||
|
|
||||||
myMouseBindings = []
|
myMouseBindings =
|
||||||
|
[
|
||||||
|
((mod4Mask, button1), (\w -> focus w >> mouseMoveWindow w >> afterDrag (snapMagicMove (Just 50) (Just 50) w)))
|
||||||
|
, ((mod4Mask .|. shiftMask, button1), (\w -> focus w >> mouseMoveWindow w >> afterDrag (snapMagicResize [L,R,U,D] (Just 50) (Just 50) w)))
|
||||||
|
, ((mod4Mask, button3), (\w -> focus w >> mouseResizeWindow w >> afterDrag (snapMagicResize [R,D] (Just 50) (Just 50) w)))
|
||||||
|
]
|
||||||
|
|
||||||
unfloatFocusedW :: X ()
|
unfloatFocusedW :: X ()
|
||||||
unfloatFocusedW = withFocused $ windows . W.sink
|
unfloatFocusedW = withFocused $ windows . W.sink
|
||||||
|
|
Loading…
Reference in New Issue