From 74f429e7a3bf2807ffd98aa7f6140f858b020799 Mon Sep 17 00:00:00 2001 From: Myned Date: Sat, 28 Dec 2024 18:42:04 -0500 Subject: [PATCH] niri: fix cursor theme in some child windows such as vscode Signed-off-by: Myned --- options/custom/desktops/niri/misc.nix | 6 ++++-- options/custom/settings/gtk/default.nix | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/options/custom/desktops/niri/misc.nix b/options/custom/desktops/niri/misc.nix index 29a6cf6..0a36579 100644 --- a/options/custom/desktops/niri/misc.nix +++ b/options/custom/desktops/niri/misc.nix @@ -46,11 +46,13 @@ in { config.home-manager.users.${config.custom.username}.home.sessionVariables; # https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous#cursor - cursor = with config.home-manager.users.${config.custom.username}.home.pointerCursor; { + cursor = with config.home-manager.users.${config.custom.username}.gtk.cursorTheme; { + # Inherit home-manager GTK settings inherit size; + theme = name; + hide-after-inactive-ms = 1000 * 15; # Milliseconds hide-when-typing = true; - theme = name; }; # https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous#hotkey-overlay diff --git a/options/custom/settings/gtk/default.nix b/options/custom/settings/gtk/default.nix index d73194a..f99aaeb 100644 --- a/options/custom/settings/gtk/default.nix +++ b/options/custom/settings/gtk/default.nix @@ -10,13 +10,6 @@ in { options.custom.settings.gtk.enable = mkOption {default = false;}; config.home-manager.users.${config.custom.username} = mkIf cfg.enable { - home.pointerCursor = { - gtk.enable = true; # Propagate attributes to gtk.cursorTheme - size = 24; - name = "GoogleDot-Black"; - package = pkgs.google-cursor; - }; - gtk = let css = readFile ./style.css; in { @@ -38,6 +31,13 @@ in { package = pkgs.papirus-icon-theme; }; + # BUG: home.pointerCursor breaks XCURSOR_PATH for some child windows, so avoid that workaround + cursorTheme = { + size = 24; + name = "GoogleDot-Black"; + package = pkgs.google-cursor; + }; + theme = { name = "adw-gtk3-dark";