-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Wayland doesn't expose user's configured mouse cursor theme/style #1742
Comments
It sounds like things are actually working correctly: setting the The heart of the issue is that wayland doesn't have a way to advise clients of the configured theme, so there's no way for wezterm to know which theme should be used without using some kind of desktop-environment specific mechanism to do so. |
For now, I've created a workaround using gsettings on GNOME: #!/usr/bin/sh
export XCURSOR_SIZE="$(gsettings get org.gnome.desktop.interface cursor-size)"
export XCURSOR_THEME="$(gsettings get org.gnome.desktop.interface cursor-theme | sed -E "s/(^'|'\$)//g")"
exec /usr/bin/wezterm $@ |
With the commit that I just pushed, you can move your workaround into your lua config: local wezterm = require 'wezterm'
local xcursor_size = nil
local xcursor_theme = nil
local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-theme"})
if success then
xcursor_theme = stdout:gsub("'(.+)'\n", "%1")
end
local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-size"})
if success then
xcursor_size = tonumber(stdout)
end
return {
xcursor_theme = xcursor_theme,
xcursor_size = xcursor_size,
} In addition to no longer requiring a wrapper script, this has the advantage of you being able to manually trigger a config reload ( |
However, the cursor theme and size are reported under a
It wouldn't be terribly difficult to hook this up in wezterm, but I'm not sure if this would give surprising results sometimes. For example, if you have two sessions running different DE on the same machine, would they both end up using the gnome settings? That's probably not desirable. I don't know if this stuff is smart enough to avoid that or not. |
I don't think that will cause problem because if I understand correctly, when you query the session dbus ( |
The code snippet at #1742 (comment), which explicitly sets wezterm's I would have added this comment to the linked issue, but couldn't because that issue is closed. Maybe @wez could add that, as the linked issue is the first Google result when searching for e.g. "wezterm mouse disappearing"? |
Done |
wezterm defaults to the "default" cursor theme, which might not be configured by default (heh) See - wez/wezterm#1742 (comment)
wezterm defaults to the "default" cursor theme, which might not be configured by default (heh) See - wez/wezterm#1742 (comment)
What Operating System(s) are you seeing this problem on?
Linux Wayland
WezTerm version
wezterm 20220319-163727-ee5d5714
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
#524 reported the same bug on X11. Although Wayland does not have a cursor configuration protocol just yet (see here for some work being done), the de-facto configuration method is still to use the Xcursor theme.
Setting the relevant environment variables
XCURSOR_THEME
andXCURSOR_SIZE
does change the cursor, so there's that.To Reproduce
Configuration
The only relevant setting is
enable_wayland = true
.Expected Behavior
This is my normal cursor (Yaru):
This is the cursor I see when mousing over WezTerm (Breeze):
I would expect to not see the cursor change when mousing over WezTerm
Logs
Logs don't provide relevant info
Anything else?
No response
The text was updated successfully, but these errors were encountered: