mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
vanadium/xmonad: warp to window
This commit is contained in:
parent
214eaa957c
commit
8aecd18722
1 changed files with 14 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import XMonad
|
|||
import XMonad.Actions.CopyWindow
|
||||
import XMonad.Actions.Submap
|
||||
import XMonad.Actions.SwapWorkspaces
|
||||
import XMonad.Actions.Warp
|
||||
import XMonad.Hooks.DynamicLog
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Hooks.InsertPosition
|
||||
|
|
@ -300,6 +301,19 @@ keybinds =
|
|||
)
|
||||
]
|
||||
|
||||
-- We override default focus shifting bindings to warp the cursor to the center of the new window.
|
||||
-- This is especially useful because mag doesn't work well with focusFollowsMouse.
|
||||
-- The order is important: focus shift, and then warp the cursor
|
||||
--
|
||||
-- Warp when focus shifts by binding, not by mouse (otherwise it's annoying)
|
||||
++ (let warp = warpToWindow 0.5 0.5
|
||||
in [ ((superMask, xK_Tab ), windows W.focusDown >> warp)
|
||||
, ((superMask .|. shiftMask, xK_Tab ), windows W.focusUp >> warp)
|
||||
, ((superMask, xK_j ), windows W.focusDown >> warp)
|
||||
, ((superMask, xK_k ), windows W.focusUp >> warp)
|
||||
]
|
||||
)
|
||||
|
||||
-- Screenshots
|
||||
++ (let fullscreen = "maim -u | xclip -in -selection clipboard -t image/png"
|
||||
withSelection = "maim -u -s -b 5 -o | xclip -in -selection clipboard -t image/png"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue