feat(user/malte): hyprpaper systemd service

This commit is contained in:
Malte Tammena 2024-04-26 20:32:18 +02:00
parent 28b7457847
commit 445f625606

View file

@ -45,6 +45,18 @@
${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ${monitor},${bg}
'';
hyprpaperSystemdService = {
Unit = {
Description = "Hyprland wallpaper daemon";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${lib.getExe pkgs.hyprpaper}";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};
wobFifo = "~/.local/share/wob/fifo";
runWob = pkgs.writeShellApplication {
name = "run-wob";
@ -129,7 +141,6 @@
"$blue" = "458588";
"$green" = "98971a";
exec-once = [
"${lib.getExe pkgs.hyprpaper}"
"${lib.getExe runWob}"
"hyprctl setcursor ${config.home.pointerCursor.name} ${builtins.toString config.home.pointerCursor.size}"
];
@ -371,12 +382,12 @@
};
in {
imports = [
./waybar.nix
./gtk.nix
./qt.nix
./pass.nix
./mako.nix
./kanshi.nix
./mako.nix
./pass.nix
./qt.nix
./waybar.nix
];
options.settings.hyprland = with lib; {
@ -398,7 +409,6 @@ in {
home.packages = [
pkgs.hyprpicker
pkgs.grimblast
pkgs.hyprpaper
];
# If running from tty1 start hyprland
@ -414,6 +424,7 @@ in {
# Configure wob
xdg.configFile."wob/wob.ini".text = wobConfig;
systemd.user.services.hyprpaper = hyprpaperSystemdService;
services.darkman.lightModeScripts."hyprpaper" = builtins.concatStringsSep "\n" (lib.mapAttrsToList (monitor: config: mkHyprpaperSwitch monitor config.background.light) monitors);
services.darkman.darkModeScripts."hyprpaper" = builtins.concatStringsSep "\n" (lib.mapAttrsToList (monitor: config: mkHyprpaperSwitch monitor config.background.dark) monitors);
};