swaybg: move to systemd service

This commit is contained in:
Rouven Seifert 2024-03-11 23:21:22 +01:00
parent 0655bc7be8
commit f32125afb7
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
3 changed files with 13 additions and 5 deletions

View file

@ -60,6 +60,18 @@
}; };
}; };
systemd.user.services.swaybg = {
Unit = {
Description = "Wallpaper tool for Wayland compositors";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png} -m fill";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
services.wlsunset = { services.wlsunset = {
enable = true; enable = true;
longitude = "13"; longitude = "13";

View file

@ -23,6 +23,7 @@
"Super" = { "Super" = {
Return = "spawn footclient"; Return = "spawn footclient";
Space = "toggle-float"; Space = "toggle-float";
A = "spawn\"${pkgs.wofi-emoji}/bin/wofi-emoji\"";
F = "toggle-fullscreen"; F = "toggle-fullscreen";
H = "focus-output previous"; H = "focus-output previous";
J = "focus-view previous"; J = "focus-view previous";
@ -41,7 +42,6 @@
}; };
"Alt" = builtins.mapAttrs (_key: bind: "spawn " + bind) { "Alt" = builtins.mapAttrs (_key: bind: "spawn " + bind) {
Space = "${pkgs.fuzzel}/bin/fuzzel"; Space = "${pkgs.fuzzel}/bin/fuzzel";
A = "${pkgs.wofi-emoji}/bin/wofi-emoji";
}; };
"None" = builtins.mapAttrs (_key: bind: "spawn \"" + bind + "\"") { "None" = builtins.mapAttrs (_key: bind: "spawn \"" + bind + "\"") {
Print = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; Print = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
@ -80,7 +80,6 @@
spawn = [ spawn = [
"rivertile" "rivertile"
''"${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png} -m fill"''
]; ];
}; };
}; };

View file

@ -6,9 +6,6 @@
enable = true; enable = true;
config = rec { config = rec {
startup = [ startup = [
{
command = "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png} -m fill";
}
{ {
command = "${pkgs.autotiling-rs}/bin/autotiling-rs"; command = "${pkgs.autotiling-rs}/bin/autotiling-rs";
} }