sway: Scale wallpaper with waifu2x-converter-cpp

This has been disabled since 2e33f18a3a,
but since I now have a 4k screen it is useful again.
This commit is contained in:
Simon Bruder 2022-02-07 20:09:25 +01:00
parent 0e2c83690e
commit 8d5480416c
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -1,15 +1,22 @@
{ config, lib, nixosConfig, pkgs, ... }:
let
# Source: “境目” by 3211 on Pixiv: https://www.pixiv.net/en/artworks/39266182
wallpaperUnfree = pkgs.fetchurl {
name = "wallpaper-unfree";
url = "https://i.pximg.net/img-original/img/2013/10/22/04/25/37/39266182_p0.jpg";
sha256 = "053gc9jd4cbkkwgcirrhpzbn933dfh83l30p1sz55m5d8zx1lk65";
curlOpts = "--referer https://pixiv.net";
meta.license = lib.licenses.unfree;
};
wallpaperUnfree = pkgs.runCommand
"wallpaper-unfree"
{
meta.license = lib.licenses.unfree;
}
''
${pkgs.waifu2x-converter-cpp}/bin/waifu2x-converter-cpp \
-i ${pkgs.fetchurl {
url = "https://i.pximg.net/img-original/img/2013/10/22/04/25/37/39266182_p0.jpg";
sha256 = "053gc9jd4cbkkwgcirrhpzbn933dfh83l30p1sz55m5d8zx1lk65";
curlOpts = "--referer https://pixiv.net";
}} \
-o out.png
# -o $out does not work
cp out.png $out
'';
wallpaperFree = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/swaywm/sway/3b2bc894a5ebbcbbd6707d45a25d171779c2e874/assets/Sway_Wallpaper_Blue_1920x1080.png";
sha256 = "1rkqd0h7w64plibn7k3krk5vdc3pnv3fc7m2xc2mxnwrbsgngwsz";