Updated general changes
- Expects xfce to be installed and session is running - Get property name before setting wallpaper because this property differs
This commit is contained in:
parent
7ea4b88901
commit
c1b253f0fe
|
@ -1,11 +1,18 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: General Changes | Install xfce4
|
- name: General Changes | Check if xfce session is running
|
||||||
become: yes
|
shell:
|
||||||
apt:
|
cmd: "echo $DESKTOP_SESSION"
|
||||||
name: xfce4
|
register: session_running
|
||||||
state: latest
|
|
||||||
update_cache: yes
|
- name: General Changes | Debug session_running
|
||||||
|
debug:
|
||||||
|
var: session_running
|
||||||
|
|
||||||
|
- name: General Changes | Stop execution if xfce session is not running
|
||||||
|
fail:
|
||||||
|
msg: "xfce session is not running"
|
||||||
|
when: session_running.stdout and session_running.stdout != 'xfce'
|
||||||
|
|
||||||
- name: General Changes | Hide icons
|
- name: General Changes | Hide icons
|
||||||
xfconf:
|
xfconf:
|
||||||
|
@ -59,9 +66,22 @@
|
||||||
dest: "{{ home_directory }}/Pictures"
|
dest: "{{ home_directory }}/Pictures"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
|
|
||||||
|
- name: General Changes | Get propery name for setting wallpaper
|
||||||
|
shell:
|
||||||
|
cmd: "xfconf-query -c xfce4-desktop -l | grep 'last-image$'"
|
||||||
|
register: wallpaper_property
|
||||||
|
|
||||||
|
- name: Debug | Debug wallpaper_property
|
||||||
|
debug:
|
||||||
|
var: wallpaper_property
|
||||||
|
|
||||||
|
- name: Debug | Debug wallpaper_property.stdout_lines
|
||||||
|
debug:
|
||||||
|
var: wallpaper_property.stdout_lines[0]
|
||||||
|
|
||||||
- name: General Changes | Change wallpaper
|
- name: General Changes | Change wallpaper
|
||||||
xfconf:
|
xfconf:
|
||||||
channel: "xfce4-desktop"
|
channel: "xfce4-desktop"
|
||||||
property: "/backdrop/screen0/monitor0/workspace0/last-image"
|
property: "{{ wallpaper_property.stdout_lines[0] }}"
|
||||||
value_type: "string"
|
value_type: string
|
||||||
value: "{{ home_directory }}/Pictures/wallpapers/2560x1440.png"
|
value: "{{ home_directory }}/Pictures/wallpapers/2560x1440.png"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user