Background changer for Gnome
This commit is contained in:
parent
ff081bbaf1
commit
12fd3bc3a2
2 changed files with 10 additions and 3 deletions
|
|
@ -1,4 +1,12 @@
|
||||||
{ lib, stdenv, feh, findutils, gnugrep, coreutils, writeScript, backgrounds_directory ? "$HOME/Immagini/Sfondi" }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, feh
|
||||||
|
, glib
|
||||||
|
, findutils
|
||||||
|
, gnugrep
|
||||||
|
, coreutils
|
||||||
|
, writeScript
|
||||||
|
, backgrounds_directory ? "$HOME/Immagini/Sfondi"}:
|
||||||
let
|
let
|
||||||
find = "${findutils}/bin/find";
|
find = "${findutils}/bin/find";
|
||||||
grep = "${gnugrep}/bin/grep";
|
grep = "${gnugrep}/bin/grep";
|
||||||
|
|
@ -9,4 +17,5 @@ writeScript "update-background.sh" ''
|
||||||
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
|
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
|
||||||
echo "image: $image"
|
echo "image: $image"
|
||||||
${feh}/bin/feh --bg-fill --no-fehbg "$image"
|
${feh}/bin/feh --bg-fill --no-fehbg "$image"
|
||||||
|
${glib}/bin/gsettings set org.gnome.desktop.background picture-uri "file://$image"
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
fehCmd = "${pkgs.feh}/bin/feh";
|
|
||||||
backgrounds_directory = ~/Immagini/Sfondi;
|
|
||||||
update_time = "10m";
|
update_time = "10m";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue