diff --git a/README.md b/README.md index d094388..705f032 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The mouse cursor is a custom theme, `ArchLogo`, with every shape redrawn in the - **Everything else** — text I-beam, resize arrows (edges, corners, column/row, all-direction), crosshair, cell, grab/grabbing hand, zoom, X, and a red not-allowed sign. These have a dark outline plus a light rim so they stay visible on blue or dark backgrounds - **Animated** — `wait` is a spinning ring, `progress` is the arrow with a small spinner badge -The artwork is drawn procedurally in [`hypr/cursor/shapes.py`](hypr/cursor/shapes.py); [`hypr/cursor/build.py`](hypr/cursor/build.py) renders it (needs `rsvg-convert` and `hyprcursor-util`) into a Hyprcursor theme for Hyprland and an XCursor theme for GTK/Qt/XWayland apps, both installed to `~/.local/share/icons/ArchLogo`. Adwaita is only used as the shape/alias list and fallback. After editing `shapes.py`, run `python3 hypr/cursor/build.py` and `hyprctl setcursor ArchLogo 24`. `hyprland.lua` sets the theme via `XCURSOR_THEME` / `HYPRCURSOR_THEME` and gsettings. +The artwork is drawn procedurally in [`hypr/cursor/shapes.py`](hypr/cursor/shapes.py); [`hypr/cursor/build.py`](hypr/cursor/build.py) renders it (needs `rsvg-convert` and `hyprcursor-util`) into a Hyprcursor theme for Hyprland and an XCursor theme for GTK/Qt/XWayland apps, both installed to `~/.local/share/icons/ArchLogo`. Adwaita is only used as the shape/alias list and fallback. It also writes `~/.local/share/icons/default/index.theme` (`Inherits=ArchLogo`), Xcursor's fallback theme, so apps that never see `XCURSOR_THEME` (Steam and Proton games started before the env was set) get the cursor too — restart Steam once after installing. After editing `shapes.py`, run `python3 hypr/cursor/build.py` and `hyprctl setcursor ArchLogo 24`. `hyprland.lua` sets the theme via `XCURSOR_THEME` / `HYPRCURSOR_THEME` and gsettings. ## Theming (aether) diff --git a/hypr/cursor/build.py b/hypr/cursor/build.py index 7568092..987fdee 100644 --- a/hypr/cursor/build.py +++ b/hypr/cursor/build.py @@ -168,6 +168,13 @@ def main(): sys.exit(f"no artwork for cursor shape '{n}'") with open(os.path.join(DEST, "index.theme"), "w") as f: f.write(f"[Icon Theme]\nName={NAME}\nComment={DESC}\nInherits={os.path.basename(BASE)}\n") + # Xcursor's fallback theme is "default": apps that never see XCURSOR_THEME (Steam, Proton + # containers, anything started before the env was set) land here and get ours too. + fallback = os.path.join(os.path.dirname(DEST), "default", "index.theme") + if not os.path.exists(fallback) or NAME in open(fallback).read(): + os.makedirs(os.path.dirname(fallback), exist_ok=True) + with open(fallback, "w") as f: + f.write(f"[Icon Theme]\nName=Default\nComment=Points at {NAME}\nInherits={NAME}\n") finally: shutil.rmtree(tmp, ignore_errors=True) print(f"installed {NAME} -> {DEST}")