From f32125afb7f8766c4aa7d28b549a160616356442 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 11 Mar 2024 23:21:22 +0100 Subject: [PATCH] swaybg: move to systemd service --- users/rouven/modules/wayland/default.nix | 12 ++++++++++++ users/rouven/modules/wayland/river.nix | 3 +-- users/rouven/modules/wayland/sway.nix | 3 --- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/users/rouven/modules/wayland/default.nix b/users/rouven/modules/wayland/default.nix index e68e13b..93452e2 100644 --- a/users/rouven/modules/wayland/default.nix +++ b/users/rouven/modules/wayland/default.nix @@ -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 = { enable = true; longitude = "13"; diff --git a/users/rouven/modules/wayland/river.nix b/users/rouven/modules/wayland/river.nix index 9a4da4a..8c1e41f 100644 --- a/users/rouven/modules/wayland/river.nix +++ b/users/rouven/modules/wayland/river.nix @@ -23,6 +23,7 @@ "Super" = { Return = "spawn footclient"; Space = "toggle-float"; + A = "spawn\"${pkgs.wofi-emoji}/bin/wofi-emoji\""; F = "toggle-fullscreen"; H = "focus-output previous"; J = "focus-view previous"; @@ -41,7 +42,6 @@ }; "Alt" = builtins.mapAttrs (_key: bind: "spawn " + bind) { Space = "${pkgs.fuzzel}/bin/fuzzel"; - A = "${pkgs.wofi-emoji}/bin/wofi-emoji"; }; "None" = builtins.mapAttrs (_key: bind: "spawn \"" + bind + "\"") { Print = "${pkgs.sway-contrib.grimshot}/bin/grimshot copy area"; @@ -80,7 +80,6 @@ spawn = [ "rivertile" - ''"${pkgs.swaybg}/bin/swaybg -i ${../../../../images/wallpaper.png} -m fill"'' ]; }; }; diff --git a/users/rouven/modules/wayland/sway.nix b/users/rouven/modules/wayland/sway.nix index 34304ff..10ca9a5 100644 --- a/users/rouven/modules/wayland/sway.nix +++ b/users/rouven/modules/wayland/sway.nix @@ -6,9 +6,6 @@ enable = true; config = rec { startup = [ - { - command = "${lib.getExe pkgs.swaybg} -i ${../../../../images/wallpaper.png} -m fill"; - } { command = "${pkgs.autotiling-rs}/bin/autotiling-rs"; }