feat(hyprland): add random wallpaper service
This commit is contained in:
parent
f02b3ae0ea
commit
f9fd542206
4 changed files with 70 additions and 42 deletions
|
|
@ -30,9 +30,12 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
my = {
|
||||
programs = {
|
||||
wallpaper.enable = true;
|
||||
kitty.enable = true;
|
||||
rofi.enable = true;
|
||||
|
||||
};
|
||||
wallpapers.enable = true;
|
||||
services.dunst.enable = true;
|
||||
};
|
||||
|
||||
|
|
@ -142,33 +145,41 @@ in
|
|||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
partOf = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 0.5";
|
||||
ExecStart = "${pkgs.hyprpaper}/bin/hyprpaper -c ${config}";
|
||||
RestartSec = "1s";
|
||||
RestartSec = "500ms";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.random-wallpaper = {
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
requires = [ "hyprpaper.service" ];
|
||||
serviceConfig = {
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 0.5";
|
||||
ExecStart = "${getExe config.my.programs.wallpaper.package} -r";
|
||||
RestartSec = "500ms";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
# only consider graphical-session.target started when hyprland-sesstion.target is reached
|
||||
systemd.user.targets.hyprland-session = {
|
||||
partOf = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
before = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
systemd.user.services.xdg-desktop-portal-hyprland = {
|
||||
after = [ "hyprland-session.target" ];
|
||||
wantedBy = [ "hyprland-session.target" ];
|
||||
after = [ "hyrpland-session.target" ];
|
||||
requiredBy = [ "xdg-desktop-portal.service" ];
|
||||
};
|
||||
|
||||
home-manager.users.moritz.systemd.user.services.nextcloud-client = {
|
||||
Service = {
|
||||
RestartSec = "1s";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
home-manager.users.moritz.systemd.user.services.nextcloud-client.Service = {
|
||||
RestartSec = "500ms";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
# add user packages for wayland and hyprland in particular
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue