WIP: rice
This commit is contained in:
parent
f842c92339
commit
1096479c4a
14 changed files with 81 additions and 32 deletions
|
|
@ -1,26 +0,0 @@
|
|||
{ feh
|
||||
, glib
|
||||
, findutils
|
||||
, gnugrep
|
||||
, coreutils
|
||||
, writeScriptBin
|
||||
, backgrounds_directory ? "$HOME/Immagini/Sfondi"
|
||||
,
|
||||
}:
|
||||
let
|
||||
find = "${findutils}/bin/find";
|
||||
grep = "${gnugrep}/bin/grep";
|
||||
shuf = "${coreutils}/bin/shuf";
|
||||
in
|
||||
writeScriptBin "update-background" ''
|
||||
#!/bin/sh
|
||||
if [ $# -eq 0 ]; then
|
||||
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
|
||||
else
|
||||
image="$1"
|
||||
fi
|
||||
echo "image: $image"
|
||||
${feh}/bin/feh --bg-fill --no-fehbg "$image"
|
||||
${glib}/bin/gsettings set org.gnome.desktop.background picture-uri "file://$image"
|
||||
true
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue