WIP: rice
This commit is contained in:
parent
f842c92339
commit
1096479c4a
14 changed files with 81 additions and 32 deletions
16
pkgs/wl-update-background/default.nix
Normal file
16
pkgs/wl-update-background/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ findutils
|
||||
, gnugrep
|
||||
, coreutils
|
||||
, writeShellScriptBin
|
||||
, swww
|
||||
, backgrounds_directory ? "$HOME/Immagini/Sfondi/1080+/1440+"
|
||||
}: writeShellScriptBin "wl-update-background" ''
|
||||
set -e
|
||||
if [ $# -eq 0 ]; then
|
||||
image=`${findutils}/bin/find ${backgrounds_directory} -type f | ${gnugrep}/bin/grep -v "/\." | ${coreutils}/bin/shuf -n 1`
|
||||
else
|
||||
image="$1"
|
||||
fi
|
||||
echo "image: $image"
|
||||
${swww}/bin/swww img "$image"
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue