project-repo / cagebreak

Cagebreak: A Wayland Tiling Compositor Inspired by Ratpoison
MIT License
272 stars 20 forks source link

Change needed for use of dot_box_mask cursor in command mode? #77

Open sodface opened 4 months ago

sodface commented 4 months ago

The use of the dot_box_mask cursor introduced in https://github.com/project-repo/cagebreak/commit/baeb39579bd0ff98e58a8244d0db8c506719983c seems to break with newer versions of the Adwaita icon theme because that asset was one of many dropped from the source. See this adwaita merge request which addresses some of the impact but it doesn't seem to include a fix for dotbox unless I'm misreading it.

I opened an issue with Alpine too.

As I stated there, I'm not sure if this is really an issue for the projects or package mainainers... maybe it's just up to the end user to make sure the cursor asset is available?

project-repo commented 4 months ago

Hi sodface, Thanks for reporting this, we hadn't noticed the disappearing cursor issue! Our suggestion is to make the cursor image in command mode configurable. That way, we can use a sane standard which is available say in Adwaita but at the same time, if the user wishes to continue using dot_box_mask, they may do so by installing the appropriate cursor and configuring cagebreak accordingly. What do you think? Cheers, project-repo

sodface commented 4 months ago

That sounds great. Thanks!

project-repo commented 4 months ago

Hi sodface

This is now implemented on the development branch (modulo documentation). You can test it using the command:

setmodecursor <cursor_name>

where is any of the cursor names present in Adwaita. The default is "cell".

Cheers project-repo

sodface commented 4 months ago

I've tested this and it seems to be working well, thank you for implementing it.

I haven't thought about it much until now, but I'm confused on what the expected behavior is for the cursor icon when switching modes, especially a mode that you normally stay in for multiple keypresses, like Resize mode or a custom mode.

For example, with Resize mode:

It seems unexpected to have the cursor return to normal when you are still in Resize mode? But I guess this is because setmode is changing the default mode and the cursor is always returned to "normal" when in default mode? Not sure I'm saying that correctly.

As another example, my previous custom "grim" mode for taking cropped screenshots would setmode grim in a script but that would not cause a cursor change so there was no visible indication that you had entered a new mode. It would be kind of nice to be able to set a different cursor for each mode... I will take a closer look when I have some more free time.

Please let me know if I am misunderstanding what's currently possible.

project-repo commented 4 months ago

Hi sodface, Thank you for your excellent suggestion! We've been discussing this and suggest implementing something along the following lines: Each mode has an assigned cursor (which can be NULL). When that mode is entered, the corresponding cursor is displayed, except if the cursor is NULL in which case the focussed window is responsible for setting the cursor (i.e. the current behaviour in "top" mode). What do you think? Since this is a breaking change, this would increase the version number to 3.0.0, so if you have any other requests/questions/ideas that would require breaking changes, please feel free to let us know (issue #73 is already scheduled). Cheers, project-repo

sodface commented 4 months ago

I think your suggestion would be perfect! Standing by to test!!