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"
"wallpapers"
];
scratchpads.term = {
animation = "fromTop";
2024-07-26 20:03:14 +07:00
command = "foot --app-id foot-scratchpad";
class = "foot-scratchpad";
2024-06-12 09:54:11 +07:00
size = "75% 75%";
};
wallpapers = {
path = cfg.pyprland.wallpaper-dirs;
unique = false;
command = ''${draw-wallpaper.path} [file]'';
};
};
};
}