home/wallpapers/summer.jpg: crop black bars
This commit is contained in:
parent
53b4f1c94b
commit
5d709ee9b6
1 changed files with 16 additions and 6 deletions
|
@ -1,4 +1,8 @@
|
||||||
{pkgs, ...}: let
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
# curlOpts for pixiv, or it returns 403.
|
# curlOpts for pixiv, or it returns 403.
|
||||||
curlOptsList = ["-e" "https://www.pixiv.net/"];
|
curlOptsList = ["-e" "https://www.pixiv.net/"];
|
||||||
in {
|
in {
|
||||||
|
@ -14,11 +18,17 @@ in {
|
||||||
url = "https://i.pximg.net/img-original/img/2023/03/29/01/29/52/106654974_p0.jpg"; # https://www.pixiv.net/en/artworks/106654974
|
url = "https://i.pximg.net/img-original/img/2023/03/29/01/29/52/106654974_p0.jpg"; # https://www.pixiv.net/en/artworks/106654974
|
||||||
hash = "sha256-mB/D46JCddOlMUtFQu7R0OtRMIoApbT1nnRv0VyzEb8=";
|
hash = "sha256-mB/D46JCddOlMUtFQu7R0OtRMIoApbT1nnRv0VyzEb8=";
|
||||||
};
|
};
|
||||||
"backgrounds/summer.jpg".source = pkgs.fetchurl {
|
"backgrounds/summer.jpg".source = let
|
||||||
|
image = pkgs.fetchurl {
|
||||||
inherit curlOptsList;
|
inherit curlOptsList;
|
||||||
url = "https://i.pximg.net/img-original/img/2015/04/23/12/43/35/49983419_p0.jpg"; # https://www.pixiv.net/en/artworks/49983419
|
url = "https://i.pximg.net/img-original/img/2015/04/23/12/43/35/49983419_p0.jpg"; # https://www.pixiv.net/en/artworks/49983419
|
||||||
hash = "sha256-JZ5VmsjVjZfHXpx3JxzAyYzZppZmgH38AiAA+B0TDiw=";
|
hash = "sha256-JZ5VmsjVjZfHXpx3JxzAyYzZppZmgH38AiAA+B0TDiw=";
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
# Crop 100px on top and bottom
|
||||||
|
pkgs.runCommandNoCC "49983419_p0.jpg" {} ''
|
||||||
|
${lib.getExe pkgs.imagemagick} convert ${image} -crop 3500x1600+0+100 $out
|
||||||
|
'';
|
||||||
"backgrounds/macos-mojave-day.jpg".source = pkgs.fetchurl {
|
"backgrounds/macos-mojave-day.jpg".source = pkgs.fetchurl {
|
||||||
url = "https://media.idownloadblog.com/wp-content/uploads/2018/06/macOS-Mojave-Day-wallpaper.jpg";
|
url = "https://media.idownloadblog.com/wp-content/uploads/2018/06/macOS-Mojave-Day-wallpaper.jpg";
|
||||||
hash = "sha256-DtIaO7jWkhdU4EqJL8QfAaaajRcME79/O8szk1po/Go=";
|
hash = "sha256-DtIaO7jWkhdU4EqJL8QfAaaajRcME79/O8szk1po/Go=";
|
||||||
|
|
Loading…
Reference in a new issue