Draw a wallpaper's subject outline first when changing to it
helpers/wallfx.py finds the subject with BiRefNet (onnxruntime, CPU), bakes outline maps per wallpaper and caches them; scans warm the cache in the background. The transition shader gains an outline mode: the line is drawn, the subject fills in, then the rest grows out of it. Uncached or subject-less wallpapers keep the colonies. wallpaper.outlineExclude opts wallpapers out. The Nix package provides the interpreter and the model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ad740ef631
commit
b6d0da4679
10 files changed
+491
-28
No files matched your search
@@ -1,4 +1,13 @@
|
||||
{ lib, stdenvNoCC, makeWrapper, quickshell, qt6, nodejs, source }:
|
||||
{ lib, stdenvNoCC, makeWrapper, quickshell, qt6, nodejs, python3, fetchurl, source }:
|
||||
let
|
||||
# Outline wallpaper transitions (quickshell/helpers/wallfx.py): BiRefNet lite
|
||||
# finds a wallpaper's subject, run on the CPU through onnxruntime.
|
||||
wallfxPython = python3.withPackages (ps: [ ps.numpy ps.opencv4 ps.pillow ps.onnxruntime ]);
|
||||
wallfxModel = fetchurl {
|
||||
url = "https://github.com/danielgatis/rembg/releases/download/v0.0.0/BiRefNet-general-bb_swin_v1_tiny-epoch_232.onnx";
|
||||
sha256 = "0crky386fm0268hy5qglpqv1d5p5n6pv0phahxbsawpmfr1h402n";
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "glassMxrph";
|
||||
version = "0.2.0";
|
||||
@@ -12,7 +21,9 @@ stdenvNoCC.mkDerivation {
|
||||
cp -r quickshell scripts tests docs dependencies.json README.md $out/share/glassMxrph/
|
||||
makeWrapper $out/share/glassMxrph/scripts/glassmxrph $out/bin/glassmxrph \
|
||||
--prefix PATH : ${lib.makeBinPath [ quickshell ]} \
|
||||
--prefix QT_PLUGIN_PATH : ${qt6.qtimageformats}/${qt6.qtbase.qtPluginPrefix}
|
||||
--prefix QT_PLUGIN_PATH : ${qt6.qtimageformats}/${qt6.qtbase.qtPluginPrefix} \
|
||||
--set-default GLASSMXRPH_WALLFX_PYTHON ${wallfxPython}/bin/python3 \
|
||||
--set-default GLASSMXRPH_WALLFX_MODEL ${wallfxModel}
|
||||
'';
|
||||
meta = {
|
||||
description = "Modular glass desktop shell for Quickshell and Hyprland";
|
||||
|
||||
Reference in new issue
Block a user