feat: refactor and add recording function on waybar
This commit is contained in:
parent
47b5336149
commit
f3475c7d02
15 changed files with 656 additions and 586 deletions
17
home/scripts/mkWall.nix
Normal file
17
home/scripts/mkWall.nix
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue