Joystickwake + background

This commit is contained in:
Filippo Berto 2021-06-22 11:22:21 +02:00
parent e080d5b9b8
commit 8acab53e36
10 changed files with 135 additions and 35 deletions

View file

@ -0,0 +1,12 @@
{ lib, stdenv, feh, findutils, gnugrep, coreutils, writeScript, backgrounds_directory ? "$HOME/Immagini/Sfondi" }:
let
find = "${findutils}/bin/find";
grep = "${gnugrep}/bin/grep";
shuf = "${coreutils}/bin/shuf";
in
writeScript "update-background.sh" ''
#!/bin/sh
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
echo "image: $image"
${feh}/bin/feh --bg-fill --no-fehbg "$image"
''