Basic wallpaper setting and restoring

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-06-11 23:26:28 +02:00
parent 519d7b3841
commit 8116fc9940
3 changed files with 30 additions and 0 deletions

View file

@ -38,6 +38,7 @@ in
../xmonad
../pantalaimon.nix
../ssh.nix
../wallpaper
];
programs.librewolf = {

View file

@ -0,0 +1,29 @@
{ pkgs, lib, ... }:
let
inherit (lib)
singleton
getExe;
in
{
systemd.user.services.wallpaper = {
Unit = {
Description = "Applies wallpaper";
After = singleton "graphical-session-pre.target";
PartOf = singleton "graphical-session.target";
};
Service = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "apply-wallpaper" ''
if [[ -f "$HOME/.config/wallpaper" ]]
then
${getExe pkgs.feh} --no-fehbg --bg-fill "$HOME/.config/wallpaper"
else
${getExe pkgs.feh} --no-fehbg --bg-fill ${./default.png}
fi
'';
};
Install.WantedBy = singleton "graphical-session.target";
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB