Easier way to manage hyprpanel theme

This commit is contained in:
Javier Feliz 2025-09-01 13:17:14 -04:00
parent 24a8ccfc8f
commit 832b2056aa
9 changed files with 512 additions and 41 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

454
flake.lock generated
View File

@ -1,5 +1,38 @@
{ {
"nodes": { "nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1755946532,
"narHash": "sha256-POePremlUY5GyA1zfbtic6XLxDaQcqHN6l+bIxdT5gc=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "81584dae2df6ac79f6b6dae0ecb7705e95129ada",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"base16": { "base16": {
"inputs": { "inputs": {
"fromYaml": "fromYaml" "fromYaml": "fromYaml"
@ -116,6 +149,22 @@
} }
}, },
"flake-compat_3": { "flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -196,7 +245,7 @@
}, },
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1705309234,
@ -230,8 +279,8 @@
}, },
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_3",
"gitignore": "gitignore", "gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
"nixpkgs" "nixpkgs"
@ -252,6 +301,28 @@
} }
}, },
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
@ -332,9 +403,218 @@
"type": "github" "type": "github"
} }
}, },
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1753964049,
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1755678602,
"narHash": "sha256-uEC5O/NIUNs1zmc1aH1+G3GRACbODjk2iS0ET5hXtuk=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "157cc52065a104fc3b8fa542ae648b992421d1c7",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-protocols": "hyprland-protocols",
"hyprland-qtutils": "hyprland-qtutils",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1756656879,
"narHash": "sha256-QCNUXw1J0BaykSKSb9jp5h1v4YVBLVcekhrxnivlgY4=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "5bb8adbc3228901d199e8d22d6f712bd1d7d4e15",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1749046714,
"narHash": "sha256-kymV5FMnddYGI+UjwIw8ceDjdeg7ToDVjbHCvUlhn14=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "613878cb6f459c5e323aaafe1e6f388ac8a36330",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprland-qt-support": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprland-qtutils",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"hyprland-qtutils",
"nixpkgs"
],
"systems": [
"hyprland",
"hyprland-qtutils",
"systems"
]
},
"locked": {
"lastModified": 1749154592,
"narHash": "sha256-DO7z5CeT/ddSGDEnK9mAXm1qlGL47L3VAHLlLXoCjhE=",
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"rev": "4c8053c3c888138a30c3a6c45c2e45f5484f2074",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"type": "github"
}
},
"hyprland-qtutils": {
"inputs": {
"hyprland-qt-support": "hyprland-qt-support",
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprland-qtutils",
"hyprlang",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1753819801,
"narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1753622892,
"narHash": "sha256-0K+A+gmOI8IklSg5It1nyRNv0kCNL51duwnhUO/B8JA=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "23f0debd2003f17bd65f851cd3f930cff8a8c809",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprshell": { "hyprshell": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1754802608, "lastModified": 1754802608,
@ -350,6 +630,56 @@
"url": "https://gitgud.foo/thegrind/hypr-shell.git" "url": "https://gitgud.foo/thegrind/hypr-shell.git"
} }
}, },
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1756117388,
"narHash": "sha256-oRDel6pNl/T2tI+nc/USU9ZP9w08dxtl7hiZxa0C/Wc=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "b2ae3204845f5f2f79b4703b441252d8ad2ecfd0",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1755184602,
"narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"my-assets": { "my-assets": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -364,12 +694,12 @@
}, },
"neovim-nightly-overlay": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects", "hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src", "neovim-src": "neovim-src",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@ -403,6 +733,22 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1756266583,
"narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1754725699, "lastModified": 1754725699,
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
@ -418,7 +764,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1754800730, "lastModified": 1754800730,
"narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=", "narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=",
@ -434,7 +780,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1754498491, "lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=", "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
@ -450,7 +796,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1708161998, "lastModified": 1708161998,
"narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=", "narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=",
@ -491,13 +837,37 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1755960406,
"narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland",
"hyprshell": "hyprshell", "hyprshell": "hyprshell",
"my-assets": "my-assets", "my-assets": "my-assets",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"stylix": "stylix", "stylix": "stylix",
"zig": "zig" "zig": "zig"
} }
@ -515,7 +885,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur",
"systems": "systems", "systems": "systems_2",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@ -537,6 +907,21 @@
} }
}, },
"systems": { "systems": {
"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_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -551,7 +936,7 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": { "systems_3": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -668,11 +1053,52 @@
"type": "github" "type": "github"
} }
}, },
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1755354946,
"narHash": "sha256-zdov5f/GcoLQc9qYIS1dUTqtJMeDqmBmo59PAxze6e4=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "a10726d6a8d0ef1a0c645378f983b6278c42eaa0",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"zig": { "zig": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_4",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1755864794, "lastModified": 1755864794,

View File

@ -7,6 +7,11 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprshell.url = "git+https://gitgud.foo/thegrind/hypr-shell.git"; hyprshell.url = "git+https://gitgud.foo/thegrind/hypr-shell.git";
hyprland.url = "github:hyprwm/Hyprland";
# hyprland-plugins = {
# url = "github:hyprwm/hyprland-plugins";
# inputs.hyprland.follows = "hyprland";
# };
stylix = { stylix = {
url = "github:danth/stylix"; url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@ -142,7 +142,6 @@
programs = { programs = {
hyprland.enable = true; hyprland.enable = true;
ssh = { ssh = {
startAgent = true; startAgent = true;
extraConfig = " extraConfig = "
@ -168,7 +167,7 @@
# Theme # Theme
stylix = { stylix = {
enable = true; enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
# image = "/home/javi/Documents/wallpapers/Fantasy-Mountain.png"; # image = "/home/javi/Documents/wallpapers/Fantasy-Mountain.png";
polarity = "dark"; polarity = "dark";
}; };

View File

@ -46,7 +46,7 @@
ms-python.python ms-python.python
ms-python.vscode-pylance ms-python.vscode-pylance
# Zig # Zig
ziglang.vscode-zig # ziglang.vscode-zig
# C++ # C++
ms-vscode.cpptools ms-vscode.cpptools
ms-vscode.cmake-tools ms-vscode.cmake-tools
@ -87,6 +87,12 @@
version = "1.37.0"; version = "1.37.0";
sha256 = "q5CTRj746404yM9mhOWYAGTzt/8CJ7Fx4QUQSJ+LdLs="; sha256 = "q5CTRj746404yM9mhOWYAGTzt/8CJ7Fx4QUQSJ+LdLs=";
} }
{
name = "vscode-antlers";
publisher = "stillat-llc";
version = "2.6.22";
sha256 = "3JtT5AxtbxciivfG6JaUYNPL74+8ydhDeB7SCE/92ko=";
}
# Qt Extension Pack # Qt Extension Pack
{ {
name = "qt-qml"; name = "qt-qml";
@ -115,7 +121,7 @@
"github.copilot.enable" = false; "github.copilot.enable" = false;
"window.titleBarStyle" = "custom"; "window.titleBarStyle" = "custom";
"window.customTitleBarVisibility" = "auto"; "window.customTitleBarVisibility" = "auto";
"workbench.colorTheme" = lib.mkForce "Gruvbox Dark Hard"; "workbench.colorTheme" = lib.mkForce "Stylix";
"git.autofetch" = true; "git.autofetch" = true;
"editor.fontSize" = lib.mkForce 18; "editor.fontSize" = lib.mkForce 18;
"editor.snippetSuggestions" = "top"; "editor.snippetSuggestions" = "top";
@ -219,6 +225,10 @@
"workbench.editor.pinnedTabsOnSeparateRow" = true; "workbench.editor.pinnedTabsOnSeparateRow" = true;
"C_Cpp.default.compileCommands" = "\${workspaceFolder}/build/compile_commands.json"; "C_Cpp.default.compileCommands" = "\${workspaceFolder}/build/compile_commands.json";
"C_Cpp.default.configurationProvider" = "ms-vscode.cmake-tools"; "C_Cpp.default.configurationProvider" = "ms-vscode.cmake-tools";
"antlersLanguageServer.languageVersion" = "runtime";
"[antlers]" = {
"editor.defaultFormatter" = "html";
};
"window.menuBarVisibility" = "compact"; "window.menuBarVisibility" = "compact";
"vim.leader" = "<space>"; "vim.leader" = "<space>";
"vim.normalModeKeyBindings" = [ "vim.normalModeKeyBindings" = [

View File

@ -23,6 +23,7 @@
]; ];
bind = [ bind = [
# "$mod, a, hyprexpo:expo, toggle"
# Start programs # Start programs
"$mod, q, exec, $terminal" "$mod, q, exec, $terminal"
"$mod SHIFT, o, exec, $browser" "$mod SHIFT, o, exec, $browser"
@ -52,7 +53,8 @@
"$mod, f, fullscreen, 0" "$mod, f, fullscreen, 0"
"$mod, v, togglefloating, active" "$mod, v, togglefloating, active"
"$mod, SPACE, exec, wofi --show drun" # "$mod, SPACE, exec, wofi --show drun"
"$mod, SPACE, exec, waycast"
"$mod, d, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" "$mod, d, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji"
"$mod SHIFT, s, exec, flameshot gui" "$mod SHIFT, s, exec, flameshot gui"
@ -82,9 +84,4 @@
) )
); );
}; };
wayland.windowManager.hyprland.plugins = [
# inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
];
} }

View File

@ -19,6 +19,13 @@
home = { home = {
sessionVariables = { sessionVariables = {
NIXOS_OZON_WL = "1"; NIXOS_OZON_WL = "1";
HYPR_PLUGIN_DIR = pkgs.symlinkJoin {
name = "hyprland-plugins";
paths = with pkgs.hyprlandPlugins; [
hyprexpo
];
};
}; };
packages = with pkgs; [ packages = with pkgs; [
@ -54,6 +61,10 @@
enable = true; enable = true;
plugins = with pkgs.hyprlandPlugins; [
hyprexpo
];
settings = { settings = {
input = { input = {
@ -103,9 +114,5 @@
"systemctl --user start hyprpolkitagent" "systemctl --user start hyprpolkitagent"
]; ];
}; };
plugins = [
# inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
];
}; };
} }

View File

@ -1,5 +1,41 @@
{ inputs, pkgs, ... }: {
inputs,
pkgs,
config,
lib,
...
}:
let
themeDirectory = "${config.programs.hyprpanel.package}/share/themes";
currentTheme = "monochrome";
raw = lib.importJSON "${themeDirectory}/${currentTheme}.json";
selectedTheme = if raw ? theme then raw.theme else raw;
# We need to turn the theme json into a nested attribute set. Otherwise we
# end up with an incorrect configuration that looks like:
# theme: {theme.bar.transparent: "value", theme.foo.bar: "another value"}
# when what we really want is: theme: {bar: ..., buttons: ...}
# ----
# turn "foo.bar.baz" and value into { foo = { bar = { baz = value; }; }; }
nestAttr = path: value: lib.attrsets.setAttrByPath (lib.splitString "." path) value;
# merge a flat attrset into nested
unflatten =
flat:
lib.foldlAttrs (
acc: k: v:
lib.recursiveUpdate acc (nestAttr k v)
) { } flat;
themeAttrs = unflatten selectedTheme;
base = themeAttrs.theme;
themeOverrides = {
font.size = "14px";
};
finalTheme = lib.recursiveUpdate base themeOverrides;
in
{ {
programs.hyprpanel = { programs.hyprpanel = {
enable = true; enable = true;
@ -41,17 +77,8 @@
menus.dashboard.directories.enabled = false; menus.dashboard.directories.enabled = false;
menus.dashboard.stats.enable_gpu = true; menus.dashboard.stats.enable_gpu = true;
theme = import ./hyprpanel/theme-gruvbox.nix; # theme = builtins.fromJSON (builtins.readFile "${themeDirectory}/${currentTheme}.json");
theme = finalTheme;
# theme.bar.transparent = {
# transparent = false;
# buttons.style = "wave";
# };
# theme.font = {
# name = "CaskaydiaCove NF";
# size = "14px";
# };
}; };
}; };
} }

View File

@ -11,7 +11,7 @@
pkgs.hyprpaper pkgs.hyprpaper
]; ];
# Home Manager # Home Manager
xdg.configFile."wallpaper.png".source = "${assets}/wallpaper.png"; xdg.configFile."wallpaper.png".source = "${assets}/Fantasy-Landscape3.png";
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
settings = { settings = {