Xmonad: move new floating windows

As described in this and this question, my floating windows sometimes appear behind other windows when using xmonad along with compton. One of the possible workarounds I want to try is to make xmonad move the new floating windows slightly, which should display them above other windows. However, being new to xmonad and Haskell, I have no idea how to achieve this.

How do I tell xmonad "When a new floating window is created, move it one pixel to the right"?

(xmonad-0.10 and xmonad-contrib-0.10)

+5
source share
2 answers

, , , :

$HOME/.xmonad.xmonad.hs:

( , Xmonad.StackSet "W.shift" , , )

import XMonad.Hooks.XPropManage
import qualified XMonad.StackSet as W
import XMonad.Actions.TagWindows
import Data.List

manageHook = xPropManageHook xPropMatches

xPropMatches :: [XPropMatch]
xPropMatches = [ ( [(wM_CLASS, any (const True))], (return (W.shift "2"))) ]

. ,

(const True)

,

String -> Bool

.

("Vimperator" `isInfixOf`)

..

: XPropManage

+1
0