HiDPI and Wayland
I recently moved from Manjaro+X11 (i3) to NixOS+Wayland (Sway). My cursor was too small on a HiDPI screen. Here's how I solved it:
Install a theme, doesn't matter which
numix-cursor-theme. In my system flake this package is added to
users.users.<name>.packages. If you're not on NixOS you'll need to use another way of getting a cursor theme. I don't know if
nix profile install nixpkgs#numix-cursor-theme will work.
firefox-wayland from nixpkgs. If you are not using Nix or somehow don't have access to
firefox-wayland then you can set
export MOZ_ENABLE_WAYLAND=1, as this appears to be what
firefox-wayland wraps the normal firefox with.
Now use the
gsettings command to change the database in
~/.config/dconf/user, which firefox apparently reads. Firefox should immediately respond to the changes and show a different cursor (or crash, as happened in my case).
nix shell nixpkgs#glib gsettings set org.gnome.desktop.interface cursor-theme Numix-Cursor-Light gsettings set org.gnome.desktop.interface cursor-size 64
If firefox doesn't immediately respond then just try to restart it or sway. This happened a couple of times in my case.
glib to my nix user packages and added the above commands to sway's configuration:
exec --no-startup-id gsettings set org.gnome.desktop.interface cursor-theme Numix-Cursor-Light exec --no-startup-id gsettings set org.gnome.desktop.interface cursor-size 64
Dark Theme & Scaling firefoxMight as well add this while I'm on the topic (since I found it a bit hard to find theming information myself). To make the firefox UI dark, install
export GTK_THEME=Matcha-dark-seaTo scale the firefox UI go to
layout.css.devPixelsPerPx = 2
AlacrittyAlacritty uses the environment variables:
export XCURSOR_SIZE=64 export XCURSOR_THEME=Numix-Cursor-LightWe can also add this to sway's config:
seat seat0 xcursor_theme Numix-Cursor-Light 64The above will set the aforementioned environment variables.
ExtraTo zoom in Sway (HiDPI), set:
output * scale 2