From fa00208934da263547292dd2730c5ceef49d95c2 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 1 Jan 2025 14:30:16 +0300 Subject: [PATCH] Wallpaper: Better image extraction. --- home/file/sway/default.nix | 2 +- option/Wallpaper.nix | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/home/file/sway/default.nix b/home/file/sway/default.nix index 7c090c9..73d24d7 100644 --- a/home/file/sway/default.nix +++ b/home/file/sway/default.nix @@ -246,6 +246,6 @@ in include /etc/sway/config.d/* '' + builtins.readFile swayRc - + lib.optionalString config.module.wallpaper.video "\nexec mpvpaper-sway" + + lib.optionalString config.module.wallpaper.video "exec mpvpaper-sway\n" + lib.concatStringsSep "\n" config.module.sway.extraConfig; } diff --git a/option/Wallpaper.nix b/option/Wallpaper.nix index a049725..90c6c34 100644 --- a/option/Wallpaper.nix +++ b/option/Wallpaper.nix @@ -8,8 +8,8 @@ let cfg = config.module.wallpaper; - url = "https://preview.redd.it/snfs0gloct491.gif?width=640&format=mp4&s=7e50d8f89ad5724b7addd900fdd5045e03c0c612"; - sha256 = "sha256-ECVd9juwzLGVtTVBKV+zs8EiqSg9DAcYqu2M+DwxWsQ="; + url = "https://preview.redd.it/d8oy5ye2vqyd1.gif?width=640&format=mp4&s=a00152d10d85859a688b8b4b12b9cf097f1cdb9b"; + sha256 = "sha256-k1wS1v/dcXihJA9vk9LXALodAWaQgQxkqfLZY7yugmA="; # Use video. video = true; @@ -27,7 +27,7 @@ let videoImage = if video then pkgs.runCommandNoCC "wallpaper-video-image" { } '' - ${pkgs.ffmpeg}/bin/ffmpeg -i ${cfg.videoPath} Image.jpg || true + ${pkgs.ffmpeg}/bin/ffmpeg -hide_banner -loglevel error -ss 00:00:00 -i ${cfg.videoPath} -frames:v 1 -q:v 1 Image.jpg cp Image.jpg $out '' else