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

Hide mouse pointer if surface is fully dimmed #9

Merged
merged 3 commits into from
Oct 13, 2024
Merged

Hide mouse pointer if surface is fully dimmed #9

merged 3 commits into from
Oct 13, 2024

Conversation

Elvyria
Copy link
Contributor

@Elvyria Elvyria commented Oct 11, 2024

Hello, my monitor is capable of automatically disabling backlight, if the surface is fully black, so i switched from using WM's dpms to dim and it works much more reliable, just my cursor is too flashy and monitor doesn't recognize surface as fully black, this PR should help with it without introducing new useless flags.

I can't imagine that someone would want to have mouse pointer on a fully black surface, but if you disagree, I can make it a flag for CLI.

@marcelohdez
Copy link
Owner

Nice! Could you add mentions about this behavior to the --alpha argument in the manpage and help string in src/opts.rs? e.g:

\-a, --alpha <ALPHA>
	Set the *alpha* value of the overlay, 0.0 being transparent and 1.0 being
+	solid black. When solid, cursor will be hidden. Default is 0.5.
    #[arg(
        short,
        long,
+       help = format!("0.0 is transparent, 1.0 is opaque. When opaque, cursor will be hidden. [default: {DEFAULT_ALPHA}]")
    )]

Also, it does not seem to work in Sway for some reason I can't figure out at the moment, but I will not let that hold the merge back, could figure that out later as it may need more invasive changes.

@Elvyria
Copy link
Contributor Author

Elvyria commented Oct 12, 2024

Looks good?

@marcelohdez
Copy link
Owner

LGTM, Thanks!

@marcelohdez marcelohdez merged commit e010be3 into marcelohdez:master Oct 13, 2024
1 check passed
@marcelohdez marcelohdez added this to the v0.3.0 milestone Oct 13, 2024
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

Successfully merging this pull request may close these issues.

2 participants