feat: refactor and add recording function on waybar

This commit is contained in:
danny 2025-08-11 01:14:53 +08:00
parent 47b5336149
commit f3475c7d02
15 changed files with 656 additions and 586 deletions

17
home/scripts/mkWall.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, pkgs }:
let
mkWall = pkgs.writeShellScriptBin "setWall" ''
url="$1"
filepath="/tmp/wall_cache/$(echo -n "$url" | base64 | tr -d '\n')"
if [[ ! -f "$filepath" ]]; then
curl -sL "$url" -o "$filepath"
fi
${config.services.swww.package}/bin/swww img "$filepath" \
--transition-fps 45 \
--transition-duration 1 \
--transition-type random
'';
in
mkWall