1
1
Fork 0

cursor: fix x11 cursor size

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2025-01-12 18:45:15 -06:00
parent e5e3a43917
commit 9b7d66968f
Signed by: Myned
GPG key ID: C7224454F7881A34

View file

@ -27,8 +27,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [cfg.cursor.package cfg.icon.package]; environment.systemPackages = [cfg.cursor.package cfg.icon.package];
# BUG: home.pointerCursor breaks XCURSOR_PATH for some child windows, so avoid that workaround # HACK: Copy home-manager implementation without setting XCURSOR_* environment variables
# HACK: Copy home-manager index.theme without setting XCURSOR_* environment variables
home-manager.sharedModules = let home-manager.sharedModules = let
# https://github.com/nix-community/home-manager/blob/59a4c43e9ba6db24698c112720a58a334117de83/modules/config/home-cursor.nix#L66C3-L77C8 # https://github.com/nix-community/home-manager/blob/59a4c43e9ba6db24698c112720a58a334117de83/modules/config/home-cursor.nix#L66C3-L77C8
defaultIndexThemePackage = pkgs.writeTextFile { defaultIndexThemePackage = pkgs.writeTextFile {
@ -44,6 +43,13 @@ in {
}; };
in [ in [
{ {
# BUG: home.pointerCursor breaks XCURSOR_PATH for some child windows, so avoid that workaround
# https://github.com/nix-community/home-manager/blob/59a4c43e9ba6db24698c112720a58a334117de83/modules/config/home-cursor.nix#L154
home.sessionVariables = {
XCURSOR_SIZE = cfg.cursor.size;
XCURSOR_THEME = cfg.cursor.name;
};
# https://github.com/nix-community/home-manager/blob/59a4c43e9ba6db24698c112720a58a334117de83/modules/config/home-cursor.nix#L161 # https://github.com/nix-community/home-manager/blob/59a4c43e9ba6db24698c112720a58a334117de83/modules/config/home-cursor.nix#L161
home.file.".icons/default/index.theme".source = "${defaultIndexThemePackage}/share/icons/default/index.theme"; home.file.".icons/default/index.theme".source = "${defaultIndexThemePackage}/share/icons/default/index.theme";
home.file.".icons/${cfg.cursor.name}".source = "${cfg.cursor.package}/share/icons/${cfg.cursor.name}"; home.file.".icons/${cfg.cursor.name}".source = "${cfg.cursor.package}/share/icons/${cfg.cursor.name}";