From f1e35d26d1712218af5ac7fa5550234485dee465 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Mon, 7 Oct 2024 09:54:29 +0100 Subject: [PATCH] cursor --- flake.lock | 109 +++++++++++++++++++++- flake.nix | 1 + home/common/programs/desktop/default.nix | 3 +- home/common/programs/hyprland/cursor.nix | 21 ++++- home/common/programs/hyprland/default.nix | 6 +- 5 files changed, 134 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 22fa1c9..02e974d 100644 --- a/flake.lock +++ b/flake.lock @@ -576,6 +576,28 @@ "type": "github" } }, + "hyprlang_2": { + "inputs": { + "nixpkgs": [ + "rose-pine-hyprcursor", + "nixpkgs" + ], + "systems": "systems_3" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -814,6 +836,22 @@ "type": "github" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1710272261, + "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": "devshell", @@ -915,8 +953,29 @@ "nixvim": "nixvim", "nvchad-starter": "nvchad-starter", "nvchad4nix": "nvchad4nix", - "systems": "systems_3", + "rose-pine-hyprcursor": "rose-pine-hyprcursor", + "systems": "systems_5", + "utils": "utils_2" + } + }, + "rose-pine-hyprcursor": { + "inputs": { + "hyprlang": "hyprlang_2", + "nixpkgs": "nixpkgs_7", "utils": "utils" + }, + "locked": { + "lastModified": 1718180692, + "narHash": "sha256-J5IYvKcdGRL/sBuST5WaoESEIl7KPv8aJK8aLY6C91E=", + "owner": "ndom91", + "repo": "rose-pine-hyprcursor", + "rev": "40ce26cb29206722ff73839ead0d871d94751e90", + "type": "github" + }, + "original": { + "owner": "ndom91", + "repo": "rose-pine-hyprcursor", + "type": "github" } }, "systems": { @@ -979,6 +1038,36 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1004,6 +1093,24 @@ "inputs": { "systems": "systems_4" }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { + "inputs": { + "systems": "systems_6" + }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", diff --git a/flake.nix b/flake.nix index c589876..339d2d3 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,7 @@ utils.url = "github:numtide/flake-utils"; hardware.url = "github:NixOS/nixos-hardware/master"; firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; + rose-pine-hyprcursor.url = "github:ndom91/rose-pine-hyprcursor"; }; outputs = diff --git a/home/common/programs/desktop/default.nix b/home/common/programs/desktop/default.nix index 8c25b8d..d4e049a 100644 --- a/home/common/programs/desktop/default.nix +++ b/home/common/programs/desktop/default.nix @@ -17,6 +17,7 @@ imv pavucontrol zathura + lxappearance # communication slack @@ -36,7 +37,7 @@ package = pkgs.orchis-theme; }; iconTheme = { - name = "tela"; + name = "Tela"; package = pkgs.tela-icon-theme; }; }; diff --git a/home/common/programs/hyprland/cursor.nix b/home/common/programs/hyprland/cursor.nix index 9b62ced..7b911ca 100644 --- a/home/common/programs/hyprland/cursor.nix +++ b/home/common/programs/hyprland/cursor.nix @@ -1,8 +1,23 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { - home.packages = with pkgs; [ rose-pine-cursor ]; + home.packages = with pkgs; [ + rose-pine-cursor + inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default + ]; - home.pointerCursor = { + home.sessionVariables = { + HYPRCURSOR_THEME = "BreezeX-RosePine-Linux"; + HYPRCURSOR_SIZE = 32; + XCURSOR_THEME = "BreezeX-RosePine-Linux"; + XCURSOR_SIZE = 32; + }; + dconf = { + enable = true; + settings = { + "org/gnome/desktop/interface" = { + cursor-theme = "BreezeX-RosePine-Linux"; + }; + }; }; } diff --git a/home/common/programs/hyprland/default.nix b/home/common/programs/hyprland/default.nix index 5379f00..2ddfcb3 100644 --- a/home/common/programs/hyprland/default.nix +++ b/home/common/programs/hyprland/default.nix @@ -18,7 +18,6 @@ in home.sessionVariables = { ELECTRON_OZONE_PLATFORM_HINT = "auto"; - XCURSOR_SIZE = 32; }; xdg.configFile = { @@ -86,6 +85,11 @@ in no_gaps_when_only = true; }; + env = [ + "HYPRCURSOR_THEME, rose-pine-hyprcursor" + "HYPRCURSOR_SIZE, 24" + ]; + "exec-once" = [ "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" "eww daemon"