fix(desktop): apply the configured cursor theme to the Hyprland session

home.sessionVariables (XCURSOR_THEME/XCURSOR_SIZE from home.pointerCursor)
land in hm-session-vars.sh, which only a login shell sources. UWSM starts
the graphical session without it, so Hyprland never saw the theme and drew
its built-in cursor instead of the configured Bibata-Modern-Ice.

Declare the cursor through Hyprland's own env directive, read at compositor
startup regardless of the shell profile, sourced from config.stylix.cursor
so the theme and size stay defined in one place.
This commit is contained in:
2026-07-24 14:29:38 -04:00
parent f967bc47bc
commit 68e0aafbbb
3 changed files with 21 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
let
cfg = config.modules.desktop.hyprland;
user = config.user.name;
cursor = config.stylix.cursor;
# Numbered-workspace switch and move for 1..9, the operator's i3 muscle memory.
workspaceBinds = lib.concatMap (n: [
@@ -62,6 +63,19 @@ in
"$mod" = "SUPER";
"$terminal" = "alacritty";
# Hand the cursor theme to the compositor directly. UWSM launches the
# session without the shell profile that carries the pointer-cursor
# variables, so without this Hyprland never sees a theme and falls back
# to its built-in cursor. Bibata ships XCursor only; the hyprcursor
# variables name the same theme, which Hyprland resolves through its
# XCursor fallback.
env = lib.optionals (cursor != null) [
"XCURSOR_THEME,${cursor.name}"
"XCURSOR_SIZE,${toString cursor.size}"
"HYPRCURSOR_THEME,${cursor.name}"
"HYPRCURSOR_SIZE,${toString cursor.size}"
];
input = {
kb_layout = "us";
# Caps is a second Escape.