NixOS/home/modules/hyprland/pyprland.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2024-06-12 09:54:11 +07:00
{ lib, pkgs, unstable, config, ... }:
let
cfg = config.profile.hyprland;
draw-wallpaper = rec {
filename = "select-wallpaper.sh";
script = pkgs.writeScriptBin filename (builtins.readFile ./scripts/draw-wallpaper.sh);
path = "${script}/bin/${filename}";
};
in
{
config = lib.mkIf cfg.enable {
home.packages = [ unstable.pyprland unstable.swww ];
home.file.".config/hypr/pyprland.toml".source =
let
tomlFormat = pkgs.formats.toml { };
in
tomlFormat.generate "pyprland.toml" {
# https://github.com/hyprland-community/pyprland/wiki/Getting-started#configuring
pyprland.plugins = [
# "scratchpads"
# "fetch_client_menu"
2024-06-12 09:54:11 +07:00
"wallpapers"
];
# scratchpads.term = {
# animation = "fromTop";
# command = "foot --app-id foot-scratchpad";
# class = "foot-scratchpad";
# size = "75% 75%";
# };
2024-06-12 09:54:11 +07:00
wallpapers = {
path = cfg.pyprland.wallpaper-dirs;
unique = false;
command = ''${draw-wallpaper.path} [file]'';
};
};
};
}