[xmonad] Resize NamedScratchpad with respect to screen size

Alexander Iliev sasoiliev+xmonad at mamul.org
Tue Mar 14 22:03:55 UTC 2023


Hi all,

I have several NamedScratchpads defined in my XMonad configuration, and 
so far I've been using a manage hook like:

         customFloating $ W.RationalRect (1/2) (1/8) (1/2) (3/4)

This made sense while I had monitors with similar resolution. I recently 
got a new monitor and now my two monitors have vastly different 
resolutions - one is 1920x1080, the other one is 3840x1600.

So here's my issue - the RationalRect above doesn't make sense for both 
monitors. It still works fine on the smaller one, on the larger however 
it results in ridiculously a wide window.

My question is - can I resize the scratchpad window I'm pulling into the 
current workspace with respect to the size of the screen that this 
workspace is displayed on?

Thank you!

Kind regards,
-- 
alexander iliev


More information about the xmonad mailing list