From caced64d1144d1f05797650a22caa979ebd2ac96 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 10 Aug 2023 16:10:39 -0400 Subject: [PATCH] set desktop background --- salt/desktop/files/00-background | 8 ++++++++ salt/desktop/xwindows.sls | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 salt/desktop/files/00-background diff --git a/salt/desktop/files/00-background b/salt/desktop/files/00-background new file mode 100644 index 000000000..6f76c6408 --- /dev/null +++ b/salt/desktop/files/00-background @@ -0,0 +1,8 @@ +# Specify the dconf path +[org/gnome/desktop/background] + +# Specify the path to the desktop background image file +picture-uri='file:///usr/local/share/backgrounds/so-wallpaper.jpg' + +# Specify one of the rendering options for the background image: +picture-options='zoom' diff --git a/salt/desktop/xwindows.sls b/salt/desktop/xwindows.sls index c7790f9f4..b18109d45 100644 --- a/salt/desktop/xwindows.sls +++ b/salt/desktop/xwindows.sls @@ -35,6 +35,23 @@ convert_gnome_classic: {% endif %} {% endfor %} +desktop_wallpaper: + file.managed: + - name: /usr/local/share/backgrounds/so-wallpaper.jpg + - source: salt://desktop/files/so-wallpaper.jpg + - makedirs: True + +set_wallpaper: + file.managed: + - name: /etc/dconf/db/local.d/00-background + - source: salt://desktop/files/00-background + +run_dconf_update: + cmd.run: + - name: 'dconf update' + - onchanges: + - file: set_wallpaper + {% else %} desktop_xwindows_os_fail: