mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +01:00
Basic wallpaper setting and restoring
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
519d7b3841
commit
8116fc9940
|
@ -38,6 +38,7 @@ in
|
|||
../xmonad
|
||||
../pantalaimon.nix
|
||||
../ssh.nix
|
||||
../wallpaper
|
||||
];
|
||||
|
||||
programs.librewolf = {
|
||||
|
|
29
home-manager/modules/wallpaper/default.nix
Normal file
29
home-manager/modules/wallpaper/default.nix
Normal 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";
|
||||
};
|
||||
}
|
BIN
home-manager/modules/wallpaper/default.png
Normal file
BIN
home-manager/modules/wallpaper/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Loading…
Reference in a new issue