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;
};
};
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
jdk21_headless
nerd-fonts.noto
xorg.xcursorgen
# kde and kde theming
kde-rounded-corners
@ -162,6 +189,22 @@
recursive = 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 = {
@ -173,9 +216,9 @@
};
cursorTheme = {
name = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}-cursors";
package = pkgs.catppuccin-cursors."${config.catppuccin.flavor}${config.catppuccinUpper.accent}";
size = 24;
name = config.home.pointerCursor.name;
package = config.home.pointerCursor.package;
size = config.home.pointerCursor.size;
};
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 = ''
[synology]
type = sftp

View file

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