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

Setting HYPRCURSOR_SIZE environment variable affects Xcursor size #8713

Open
1 task done
izmyname opened this issue Dec 14, 2024 · 10 comments
Open
1 task done

Setting HYPRCURSOR_SIZE environment variable affects Xcursor size #8713

izmyname opened this issue Dec 14, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@izmyname
Copy link
Contributor

izmyname commented Dec 14, 2024

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

No

System Info and Version

System/Version info
Hyprland 0.45.0 built from branch main at commit 3cba4ba44e7ba3cc8bb67ac71bc61245b5aca347  (hyprctl: avoid crash on null pwuid).
Date: Sat Dec 14 03:36:42 2024
Tag: v0.45.0-107-g3cba4ba4, commits: 5540
built against:
 aquamarine 0.5.1
 hyprlang 0.6.0
 hyprutils 0.2.6
 hyprcursor 0.1.10
 hyprgraphics 0.1.1


flags set:
debug


System Information:
System name: Linux
Node name: archbtw
Release: 6.12.4-zen1-1-zen
Version: #1 ZEN SMP PREEMPT_DYNAMIC Mon, 09 Dec 2024 14:30:31 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] [10de:2191] (rev a1) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX x86_64 Kernel Module  565.77  Wed Nov 27 23:33:08 UTC 2024


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

Description

Setting HYPRCURSOR_SIZE environment variable also affects xcursor size. This doesn't happen if hyprcursor is set with exec-once=hyprctl setcursor within hyprland.conf

How to reproduce

Set HYPRCURSOR_SIZE=48 , XCURSOR_SIZE=24, re-exit the session. Xcursor size will be 48, despite XCURSOR_SIZE variable value

Crash reports, logs, images, videos

No response

@izmyname izmyname added the bug Something isn't working label Dec 14, 2024
@izmyname
Copy link
Contributor Author

Also, why I even care about different cursor sizes: is this also a bug or a feature?

@vaxerski
Copy link
Member

I don't see the point of "nominal size", especially with svg cursors. It's a useless remnant of the times long gone.

@Covkie
Copy link

Covkie commented Dec 15, 2024

nominal size allows you to 'crop' into the cursor so whitespace around the cursor doesnt make it look tiny. its very useful and allows for the "core" cursor to remain ex: 24 pixels at size 24 while 'modals' around the main cursor can go beyond into said whitespace. many themes use this functionality and not supporting it results in issues like this.

Disregarding that, telling users that they need to set two sizes isnt very nice and we all know GTK won't be adopting the cursor shape protocol anytime soon, so for a lot of apps this problem won't just vanish overnight.

@vaxerski
Copy link
Member

Disregarding that, telling users that they need to set two sizes isnt very nice

they do have to regardless of whether HC has nominal size or not.

nominal size allows you to 'crop' into the cursor so whitespace around the cursor doesnt make it look tiny. its very useful and allows for the "core" cursor to remain ex: 24 pixels at size 24 while 'modals' around the main cursor can go beyond into said whitespace

This loses its sense in scalable cursors, unless nominal size is a float that multiplies with the "cursor" size.

I still fail to see the point, though, as one can for example set size 32 instead of 24 and use that as a whitespace buffer zone.

Can you give a concrete example of where the "modal being bigger" is actually desirable? To me it just seems inconvenient, having the cursor suddenly bigger than 24x just because the theme author wanted some arrow resize cursor to be idk 32x.

@Covkie
Copy link

Covkie commented Dec 17, 2024

This loses its sense in scalable cursors, unless nominal size is a float that multiplies with the "cursor" size.

Yep thats exactly how it would behave on a scalable cursor. See the plasmasvg cursor implementation.

I still fail to see the point, though, as one can for example set size 32 instead of 24 and use that as a whitespace buffer zone.

Yes that is possible but that results in the main cursor appearing smaller than 32 pixels

Here is an example using the plasma cursor preview.
left has svgs of 32x32 with nominal size 24. right has svgs of 32x32
image

The 'core' of the cursors on the left are 24x24 with only the ? and spinner on the arrows being out of that space. The right cursors all appear substantially smaller due to the excess whitespace around them. That is what nominal is for.

having the cursor suddenly bigger than 24x just because the theme author wanted some arrow resize cursor to be idk 32x.

Nominal size isnt for arbitrarily making the cursor bigger (it can but atp youre just misusing it :p) as you can see in the examples. Its for cursor 'decorations/modals' that would otherwise make the cursor unexpectedly smaller.

@vaxerski
Copy link
Member

mhm, I get you.

@vaxerski
Copy link
Member

see hyprwm/hyprcursor#73

@izmyname
Copy link
Contributor Author

If it lets me configure hyprcursor with vars, w/o breaking xcursor - noice

@vaxerski
Copy link
Member

I was more referring to @Covkie, after all they are the ones wanting to use this, so I want to make sure this solution works for them

@izmyname
Copy link
Contributor Author

Oh, it doesn't just fix already compiled hyprcursors. No HYPRCURSOR_* variable, this time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants