Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sodface opened this issue Apr 21, 2024 · 6 comments
Open

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

sodface opened this issue Apr 21, 2024 · 6 comments

Comments

@sodface
Copy link

sodface commented Apr 21, 2024

The use of the dot_box_mask cursor introduced in baeb395 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
Copy link
Owner

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
Copy link
Author

sodface commented Apr 23, 2024

That sounds great. Thanks!

@project-repo
Copy link
Owner

Hi sodface

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

setmodecursor <cursor_name>

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

Cheers
project-repo

@sodface
Copy link
Author

sodface commented Apr 28, 2024

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:

  • ctrl + t (cursor changes to setmodecursor value or default cell)
  • Shift + r (now in Resize mode but cursor has changed back "normal" eg, pointer, bar, etc)

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
Copy link
Owner

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
Copy link
Author

sodface commented May 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants