NixOS/home/modules/hyprland/pyprland.nix

38 lines
1.1 KiB
Nix

{ 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"
"wallpapers"
];
# scratchpads.term = {
# animation = "fromTop";
# command = "foot --app-id foot-scratchpad";
# class = "foot-scratchpad";
# size = "75% 75%";
# };
wallpapers = {
path = cfg.pyprland.wallpaper-dirs;
unique = false;
command = ''${draw-wallpaper.path} [file]'';
};
};
};
}