Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.8k stars 714 forks source link

if cursor is set to Adwaita, waybar renders bigger cursor size than sway and other apps #1948

Open iambumblehead opened 1 year ago

iambumblehead commented 1 year ago

Hello,

I'm setting up waybar for the first time. The system uses sway wm. When the Adwaita is set as the icon theme, sway, qutebrowser and foot terminal emulator render the Adwaita cursor in the same size, but when the cursor is hovered over waybar, the cursor becomes bigger. Is there a way to resolve this? Is there a way to tweak waybar's cursor scaling behaviour specifically, without affecting any other applications?

The cursor theme is set by adding this file

~/.icons/default/index.theme

[Icon Theme]
Name=Default
Inherits=Adwaita

possibly related issue https://github.com/Alexays/Waybar/issues/84

Thank you

iambumblehead commented 1 year ago

glib:bin was installed, to supply the gsettings command to possibly set the cursor size, but this command fails,

gsettings set org.gnome.desktop.interface cursor-size 40
No schemas installed
iambumblehead commented 1 year ago

I succeeded by doing the following, installing both glib and gsettings schemas, calling gsettings, then uninstalling

guix install glib:bin gsettings-desktop-schemas
gsettings set org.gnome.desktop.interface cursor-size 28
guix remove glib:bin gsettings-desktop-schemas

program-generated-systems through guix or nixos won't be able to practically automate this step

BoomerangNebula commented 1 year ago

You might find that Waybar was following your settings/expected defaults while Sway and the others were not.

gsettings is the recommended way to set themes under Sway. In addition to gsettings, if you are running seatd try adding the following line to your Sway config. It can help with apps (including Sway) that present problems.

seat seat0 xcursor_theme Adwaita 24

If you don't want to keep these installed and included in your config you may see mixed success with theming.

https://wiki.gentoo.org/wiki/Sway#GTK_theme_and_font

iambumblehead commented 1 year ago

@BoomerangNebula to match the bigger size of the waybar cursor, it is necessary to set xcursor_theme Adwaita 30 and the cursor is quite huge

Thanks for the reply and suggestion

BoomerangNebula commented 1 year ago

Are you scaling your outputs as suggested by the previous title?

I can't reproduce an issue when using the settings discussed here. Waybar obeys gsettings set org.gnome.desktop.interface cursor-size <size> and Sway and others obey seat seat0 xcursor_theme <theme> <size>.

These two blocks produce the same cursor size at different scales.

gsettings set org.gnome.desktop.interface cursor-theme Adwaita
gsettings set org.gnome.desktop.interface cursor-size 24
seat seat0 xcursor_theme Adwaita 24
output * scale 2
gsettings set org.gnome.desktop.interface cursor-theme Adwaita
gsettings set org.gnome.desktop.interface cursor-size 12
seat seat0 xcursor_theme Adwaita 12
iambumblehead commented 1 year ago

yes as mentioned in the earlier ticket, waybar's cursor can be scaled down with gsettings commands like this one

gsettings set org.gnome.desktop.interface cursor-size 28

if there could be a way to control waybar's cursor size without gsettings, such as a configuration value, a command modifier, or an env var, that would be great for anyone who does need a different cursor size. It is appreciated that sway allows cursor size to be configured without installing gsettings.

rivnakm commented 8 months ago

I'm a bit late to the party here, but worth mentioning as I've spend the past few days trying to solve this on my computer. In order for GTK settings to be applied on wayland you need to install xdg-desktop-portal-gtk

iambumblehead commented 8 months ago

One can also use a different status bar, such as yambar, which smaller and does not depend on gtk things

fxzxmicah commented 2 months ago

I'm a bit late to the party here, but worth mentioning as I've spend the past few days trying to solve this on my computer. In order for GTK settings to be applied on wayland you need to install xdg-desktop-portal-gtk

Thank you, this resolves everything. You can set the cursor theme without installing the package xdg-desktop-portal-gtk, but you need it to set the size, otherwise the cursor will be too large.