wallpaper: use wpaperd
This commit is contained in:
parent
5b59daa8b3
commit
fa2c7501c1
3 changed files with 57 additions and 17 deletions
|
|
@ -88,14 +88,13 @@
|
|||
theme = config.userOptions.cursor.name;
|
||||
};
|
||||
layout = {
|
||||
gaps = 4;
|
||||
gaps = 2;
|
||||
background-color = pkgs.catppuccin.${config.catppuccin.flavor}.mantle;
|
||||
default-column-width = {
|
||||
proportion = 0.5;
|
||||
};
|
||||
preset-column-widths = [
|
||||
{proportion = 1.0 / 3.0;}
|
||||
{proportion = 1.0 / 2.0;}
|
||||
{proportion = 2.0 / 3.0;}
|
||||
];
|
||||
border = {
|
||||
|
|
@ -131,8 +130,8 @@
|
|||
];
|
||||
open-floating = true;
|
||||
default-floating-position = {
|
||||
x = 32;
|
||||
y = 32;
|
||||
x = 16;
|
||||
y = 16;
|
||||
relative-to = "bottom-left";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@
|
|||
general = {
|
||||
avatarImage = "/home/${config.userOptions.username}/.face";
|
||||
dimmerOpacity = 0.6;
|
||||
showScreenCorners = true;
|
||||
forceBlackScreenCorners = true;
|
||||
showScreenCorners = false;
|
||||
forceBlackScreenCorners = false;
|
||||
scaleRatio = 1;
|
||||
radiusRatio = 1;
|
||||
iRadiusRatio = 1;
|
||||
|
|
@ -356,13 +356,9 @@
|
|||
criticalUrgencyDuration = 15;
|
||||
enableKeyboardLayoutToast = true;
|
||||
sounds = {
|
||||
enabled = false;
|
||||
enabled = true;
|
||||
volume = 0.5;
|
||||
separateSounds = false;
|
||||
criticalSoundFile = "";
|
||||
normalSoundFile = "";
|
||||
lowSoundFile = "";
|
||||
excludedApps = "";
|
||||
};
|
||||
};
|
||||
osd = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
bingWallpaperScript = pkgs.writeShellScript "bing-wallpaper" ''
|
||||
script = pkgs.writeShellScript "bing-wallpaper" ''
|
||||
set -euo pipefail
|
||||
|
||||
# Configuration
|
||||
|
|
@ -63,27 +63,72 @@
|
|||
echo "Wallpaper downloaded and applied successfully."
|
||||
'';
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
wpaperd
|
||||
];
|
||||
|
||||
home.file.".config/wpaperd/config.toml" = {
|
||||
text = ''
|
||||
[default]
|
||||
mode = "center"
|
||||
|
||||
[any]
|
||||
path = "/home/${config.userOptions.username}/.local/share/wallpaper/daily.jpg"
|
||||
'';
|
||||
force = true;
|
||||
};
|
||||
|
||||
systemd.user.services.wpaperd = {
|
||||
Unit = {
|
||||
Description = "Modern wallpaper daemon for Wayland";
|
||||
PartOf = ["niri.service"];
|
||||
Requires = ["niri.service"];
|
||||
After = ["niri.service"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.wpaperd}/bin/wpaperd";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [
|
||||
"niri.service"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.bing-wallpaper = {
|
||||
Unit = {
|
||||
Description = "Download and set Bing wallpaper of the day";
|
||||
After = [
|
||||
"network-online.target"
|
||||
"niri.service"
|
||||
"noctalia.service"
|
||||
];
|
||||
Wants = [
|
||||
"network-online.target"
|
||||
"noctalia.service"
|
||||
];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${bingWallpaperScript}";
|
||||
ExecStart = "${script}";
|
||||
ExecStartPost = "${pkgs.systemd}/bin/systemctl --user restart wpaperd.service";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = ["niri.service"];
|
||||
WantedBy = [
|
||||
"niri.service"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers.bing-wallpaper = {
|
||||
Unit = {
|
||||
Description = "Run bing wallpaper retrieval daily";
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* 10:00:00 GMT";
|
||||
Persistent = true;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["timers.target"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue