fix cursors

This commit is contained in:
Sean Kovacs 2025-12-14 10:13:58 -05:00
commit 7772bb6b67
Signed by: sckova
GPG key ID: 00F325187C68651A
3 changed files with 62 additions and 6 deletions

View file

@ -72,6 +72,32 @@
default = 10; default = 10;
}; };
}; };
cursor =
let
attrName = config.catppuccin.flavor + config.catppuccinUpper.accent;
in
{
name = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}-cursors";
};
package = lib.mkOption {
type = lib.types.package;
readOnly = true;
default = pkgs.catppuccin-cursors.${attrName};
};
size = lib.mkOption {
type = lib.types.int;
readOnly = true;
default = 24;
};
path = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "${pkgs.catppuccin-cursors.${attrName}}/share/icons";
};
};
}; };
}; };
@ -102,6 +128,7 @@
nixfmt-rfc-style nixfmt-rfc-style
jdk21_headless jdk21_headless
nerd-fonts.noto nerd-fonts.noto
xorg.xcursorgen
# kde and kde theming # kde and kde theming
kde-rounded-corners kde-rounded-corners
@ -162,6 +189,22 @@
recursive = true; recursive = true;
force = true; force = true;
}; };
".icons/default/index.theme" = {
text = ''
[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=${config.userOptions.cursor.name}
'';
force = true;
};
};
home.pointerCursor = {
gtk.enable = true;
name = config.userOptions.cursor.name;
package = config.userOptions.cursor.package;
size = config.userOptions.cursor.size;
}; };
gtk = { gtk = {
@ -173,9 +216,9 @@
}; };
cursorTheme = { cursorTheme = {
name = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}-cursors"; name = config.home.pointerCursor.name;
package = pkgs.catppuccin-cursors."${config.catppuccin.flavor}${config.catppuccinUpper.accent}"; package = config.home.pointerCursor.package;
size = 24; size = config.home.pointerCursor.size;
}; };
gtk3.extraConfig = { gtk3.extraConfig = {

View file

@ -1,6 +1,17 @@
{ pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
systemd.user.sessionVariables = {
XCURSOR_THEME = config.userOptions.cursor.name;
XCURSOR_SIZE = toString config.userOptions.cursor.size;
XCURSOR_PATH = config.userOptions.cursor.path;
};
xdg.configFile."rclone/synology.conf".text = '' xdg.configFile."rclone/synology.conf".text = ''
[synology] [synology]
type = sftp type = sftp

View file

@ -41,6 +41,8 @@
environment = { environment = {
QT_QPA_PLATFORM = "wayland"; QT_QPA_PLATFORM = "wayland";
DISPLAY = null; DISPLAY = null;
XCURSOR_THEME = config.userOptions.cursor.name;
XCURSOR_SIZE = toString config.userOptions.cursor.size;
}; };
outputs = { outputs = {
"eDP-1" = { "eDP-1" = {
@ -56,8 +58,8 @@
cursor = { cursor = {
hide-when-typing = true; hide-when-typing = true;
hide-after-inactive-ms = 2000; hide-after-inactive-ms = 2000;
size = config.gtk.cursorTheme.size; size = config.userOptions.cursor.size;
theme = config.gtk.cursorTheme.name; theme = config.userOptions.cursor.name;
}; };
layout = { layout = {
gaps = 4; gaps = 4;