hyprland-wiki/pages/Hypr Ecosystem/hyprcursor.md

64 lines
1.9 KiB
Markdown
Raw Normal View History

2024-03-17 13:44:39 +01:00
---
weight: 5
title: hyprcursor
---
2024-03-09 17:58:32 +01:00
hyprcursor is a new cursor theme format that has many advantages
over the widely used xcursor.
## Hyprcursor themes
2024-07-30 22:44:45 +02:00
You will need to obtain those yourself. If you are on the Discord server, see
`#hyprcursor-themes`.
2024-03-09 17:58:32 +01:00
Put your theme(s) in `~/.local/share/icons` or `~/.icons`
2024-03-15 18:58:35 +01:00
{{< callout type=warning >}}
2024-07-30 22:44:45 +02:00
It's not recommended to put cursor themes in system-wide `/usr/share/icons` due
to potential permission issues.
2024-03-15 18:58:35 +01:00
{{< /callout >}}
2024-03-09 17:58:32 +01:00
You can set your theme with envvars, or with `hyprctl setcursor`.
Env:
- `HYPRCURSOR_THEME` controls the theme.
- `HYPRCURSOR_SIZE` controls the cursor size.
example snippet of `hyprland.conf`:
```ini
env = HYPRCURSOR_THEME,MyCursor
env = HYPRCURSOR_SIZE,24
2024-03-09 19:27:52 +01:00
```
## Creating / Porting Themes
Go to the [hyprcursor repo](https://github.com/hyprwm/hyprcursor)
2024-03-09 19:34:05 +01:00
See the `docs/` and `hyprcursor-util/` directories for instructions.
## Important notes
2024-07-30 22:44:45 +02:00
Although many apps support server-side cursors (e.g. Qt, Chromium, Electron,
Hypr Ecosystem) some apps still don't (e.g. GTK).
2024-03-09 19:34:05 +01:00
2024-07-30 22:44:45 +02:00
Apps that do not support server-side cursors and hyprcursor will still fall back
to XCursor.
2024-03-09 19:34:05 +01:00
2024-07-30 22:44:45 +02:00
For those apps, you need to export `XCURSOR_THEME` and `XCURSOR_SIZE` to a valid
XCursor theme, and run `gsettings set org.gnome.desktop.interface cursor-theme
'THEME_NAME'` for gtk. If `gsettings` schemas are not available to you (e.g. on
NixOS you will get `No schemas installed`), you can run instead: `dconf write
/org/gnome/desktop/interface/cursor-theme "'THEME_NAME'"`.
2024-03-09 19:34:05 +01:00
2024-07-30 22:44:45 +02:00
If the app is a flatpak, run `flatpak override --filesystem=~/.themes:ro
--filesystem=~/.icons:ro --user` and put your themes in both `/usr/share/themes`
and `~/.themes`, and put your icons and XCursors in both `/usr/share/icons`
and `~/.icons`.
## I don't want to use hyprcursor
If you don't have any hyprcursor themes installed, Hyprland will fall back to XCursor, and use
2024-03-17 13:44:39 +01:00
whatever you define with `XCURSOR_THEME` and `XCURSOR_SIZE`.