xmonad-contrib icon indicating copy to clipboard operation
xmonad-contrib copied to clipboard

X.H.Screencorners: Add per monitor hot corners

Open Schievel1 opened this issue 11 months ago • 4 comments

Description

The original implementation of ScreenCorners only allowed hot corners and edges an the corners/ edges of the screen canvas. While this happens to be the same like the corners/ edges of the monitor on a single monitor setup, it is not in a multi monitor setup. See the screenshot below for a visual explanation: image In the screenshot, the light grey area surrounding all the screen is the canvas. The original Screencorners only allowed hot corners to be placed at the corners and edges of that area. So if a monitor position was shifted down in the y axis, like in the screenshot the monitors HDMI-A-0 and DVI-D-1, the upper left corner could never be reached with the mouse. (Same goes for the lower left and upper/ lower screen edges) My new implementation deprecates but keeps the functions addScreenCorner and addScreenCorners to not break the existing configuration of users. It adds the functions addMonitorCorner and addMonitorCorners which take a screen corner/edge as before and additionally a monitor number and a dimension. With the monitor number it is possible to place hot corners/ edges an a single monitor. The dimension is important, because before the windows that were the hot areas are only 1x1 pixels wide. They are very hard to hit with the mouse if there are on a corner of a screen in the middle. Usage is now addMonitorCorner SCUpperLeft 0 20 (spawn "firefox") and users that were using the addScreencorner function before like this addScreenCorner SCUpperLeft (spawn "firefox") can migrate to this using addMonitorCorner SCUpperLeft 0 1 (spawn "firefox") (if monitor 0 is their leftmost monitor)

Checklist

  • [x] I've read CONTRIBUTING.md

  • [x] I've considered how to best test these changes (property, unit, manually, ...) and concluded: Create a hot corner in every corner and edge of every monitor and see if they work.

  • [x] I updated the CHANGES.md file

Schievel1 avatar Jan 03 '25 14:01 Schievel1

link to #919

nilscc avatar Jan 03 '25 16:01 nilscc

"Great minds think alike"? 😀

geekosaur avatar Jan 03 '25 16:01 geekosaur

He sent me the initial feature request 😄

nilscc avatar Jan 03 '25 17:01 nilscc

He sent me the initial feature request 😄

Not really, I sent him an email yesterday

So to test this I can not really come up with more than "create a bunch of hot corners in every screen corner and edge you have and see if they work". Testing this in an automated way would require simulating screen and whatnot, wouldn't it?

Schievel1 avatar Jan 03 '25 18:01 Schievel1

@Schievel1 friendly ping

slotThe avatar Aug 30 '25 13:08 slotThe