fix(cursor): get rid of gtk4 warning and refactor

This commit is contained in:
matt1432 2025-01-05 22:19:36 -05:00
parent d6390db32d
commit 6b097eb53f
4 changed files with 40 additions and 60 deletions
modules/desktop/theme/cursors

View file

@ -9,36 +9,21 @@ self: {
inherit (lib) mkIf;
cfg = osConfig.roles.desktop;
cursorTheme = dracula.hyprcursor;
cursorThemeName = "Dracula-cursors";
hyprcursorThemeName = "Dracula-hyprcursor";
cursorSize = 24;
in {
config = mkIf cfg.enable {
home.pointerCursor = {
name = cursorThemeName;
name = "Dracula-cursors";
package = dracula.gtk;
size = cursorSize;
size = 24;
gtk.enable = true;
x11 = {
enable = true;
defaultCursor = cursorThemeName;
};
hyprcursor.enable = true;
};
home.file.".local/share/icons/${hyprcursorThemeName}".source = cursorTheme;
# Fixes Gtk4 apps complaining about mismatched cursor size
wayland.windowManager.hyprland.settings = {
envd = [
"XCURSOR_THEME, ${cursorThemeName}"
"XCURSOR_SIZE, ${toString cursorSize}"
];
exec-once = [
"hyprctl setcursor ${hyprcursorThemeName} ${toString cursorSize}"
"gsettings set org.gnome.desktop.interface cursor-size 30"
];
};
};