Better change background script
This commit is contained in:
parent
c272958a51
commit
4833402f65
2 changed files with 6 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs ? import <nixos-unstable> { inherit system; }
|
||||
{ pkgs ? import <nixos> { inherit system; }
|
||||
, system ? builtins.currentSystem
|
||||
}:
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,11 @@ let
|
|||
in
|
||||
writeScript "update-background.sh" ''
|
||||
#!/bin/sh
|
||||
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
|
||||
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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue