mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-18 02:31:01 +01:00
packages: Add phosh-backgrounds
This is a sane default that works well enough.
This commit is contained in:
parent
8a3c22505e
commit
c51951e3de
@ -12,6 +12,8 @@ let
|
|||||||
inherit (config.modules.system) username;
|
inherit (config.modules.system) username;
|
||||||
inherit (builtins) attrValues;
|
inherit (builtins) attrValues;
|
||||||
|
|
||||||
|
phosh-backgrounds = pkgs.callPackage ../../packages/phosh-backgrounds.nix { };
|
||||||
|
|
||||||
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}";
|
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}";
|
||||||
|
|
||||||
rgba =
|
rgba =
|
||||||
@ -169,19 +171,19 @@ in
|
|||||||
stylix.targets.gtk.extraCss = # css
|
stylix.targets.gtk.extraCss = # css
|
||||||
''
|
''
|
||||||
phosh-lockscreen {
|
phosh-lockscreen {
|
||||||
background: ${bg}, url('file:///home/${username}/wall-lock.jpg');
|
background: ${bg}, url('${phosh-backgrounds}/wall-lock.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
phosh-app-grid {
|
phosh-app-grid {
|
||||||
background: ${bg}, url('file:///home/${username}/wall-grid.jpg');
|
background: ${bg}, url('${phosh-backgrounds}/wall-grid.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
phosh-top-panel {
|
phosh-top-panel {
|
||||||
background: ${bg}, url('file:///home/${username}/wall-panel.jpg');
|
background: ${bg}, url('${phosh-backgrounds}/wall-panel.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
phosh-home {
|
phosh-home {
|
||||||
background: ${bg}, url('file:///home/${username}/wall-home.jpg');
|
background: ${bg}, url('${phosh-backgrounds}/wall-home.jpg');
|
||||||
}
|
}
|
||||||
|
|
||||||
phosh-lockscreen, phosh-app-grid, phosh-top-panel, phosh-home {
|
phosh-lockscreen, phosh-app-grid, phosh-top-panel, phosh-home {
|
||||||
|
62
packages/phosh-backgrounds.nix
Normal file
62
packages/phosh-backgrounds.nix
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenvNoCC,
|
||||||
|
fetchurl,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
pname = "phosh-backgrounds";
|
||||||
|
version = "2024-07-15";
|
||||||
|
|
||||||
|
srcs = [
|
||||||
|
(fetchurl {
|
||||||
|
name = "wall-panel.jpg";
|
||||||
|
url = "https://forums.puri.sm/uploads/default/original/2X/e/ebaa0cf196c1dd9a63cbdb3ddb7c57b1d443b559.jpeg";
|
||||||
|
hash = "sha256-hXMUb5rxbRcW1VYT5gZyUAuyJwZNyyGbHHKLIpkXv8w=";
|
||||||
|
})
|
||||||
|
|
||||||
|
(fetchurl {
|
||||||
|
name = "wall-lock.jpg";
|
||||||
|
url = "https://forums.puri.sm/uploads/default/original/2X/e/e056aea7bf5bb8b7a75dc6b95ec296c7e0a62303.jpeg";
|
||||||
|
hash = "sha256-ot4loxl4OZ/zgbWwSfdqZL5upg6+Svuua2GOwPRYY9E=";
|
||||||
|
})
|
||||||
|
|
||||||
|
(fetchurl {
|
||||||
|
name = "wall-home.jpg";
|
||||||
|
url = "https://forums.puri.sm/uploads/default/original/2X/1/1d508f9b773c46118f5380a1cf2c619916817245.jpeg";
|
||||||
|
hash = "sha256-h+jCKp7Wyu0ETxcM7KTBpLz2Sxo9gwfY3GQIOGUOXQg=";
|
||||||
|
})
|
||||||
|
|
||||||
|
(fetchurl {
|
||||||
|
name = "wall-grid.jpg";
|
||||||
|
url = "https://forums.puri.sm/uploads/default/original/2X/e/eb02bc8f16cf485e1a5f6aae076bfaa79f5fba70.jpeg";
|
||||||
|
hash = "sha256-McGHFrwLh7jDYWCPDC14GM85Uc74RpdgMqSgAtMDeaQ=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
runHook preUnpack
|
||||||
|
|
||||||
|
for srcFile in $srcs; do
|
||||||
|
cp $srcFile $(stripHash $srcFile)
|
||||||
|
done
|
||||||
|
|
||||||
|
runHook postUnpack
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -Dm644 *.jpg -t $out
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Custom background for Phosh with seamless picture for a full-screen background image";
|
||||||
|
license = lib.licenses.cc-by-sa-40;
|
||||||
|
homepage = "https://forums.puri.sm/t/tutorial-add-a-custom-background-in-phosh/13385/23";
|
||||||
|
maintainers = with lib.maintainers; [ donovanglover ];
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user