From b07f9ff817672a7e50073e0de562f4a42442b6b2 Mon Sep 17 00:00:00 2001 From: exu Date: Wed, 16 Oct 2024 08:54:51 +0200 Subject: [PATCH] Remove wallpaper in old containments --- roles/config/tasks/plasma.yml | 36 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/roles/config/tasks/plasma.yml b/roles/config/tasks/plasma.yml index c8d4ef33..012b506d 100644 --- a/roles/config/tasks/plasma.yml +++ b/roles/config/tasks/plasma.yml @@ -1,24 +1,26 @@ --- -# - name: Plasma | Set desktop wallpaper -# ansible.builtin.shell: | -# qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript " -# desktops().forEach((d) => { -# d.currentConfigGroup = [ -# 'Wallpaper', -# 'org.kde.image', -# 'General', -# ] -# d.writeConfig('Image', '{{ background_image }}') -# d.writeConfig('FillMode', '1') -# d.reloadConfig() -# }) -# " -# tags: config +- name: Plasma | Remove previously set wallpapers + ansible.builtin.shell: | + kwriteconfig6 --file ~/.config/plasma-org.kde.plasma.desktop-appletsrc --group Containments --group 1 --group Wallpaper --group org.kde.image --group General --key Image --delete + kwriteconfig6 --file ~/.config/plasma-org.kde.plasma.desktop-appletsrc --group Containments --group 1 --group Wallpaper --group org.kde.image --group General --key FillMode --delete + kwriteconfig6 --file ~/.config/plasma-org.kde.plasma.desktop-appletsrc --group Containments --group 2 --group Wallpaper --group org.kde.image --group General --key Image --delete + kwriteconfig6 --file ~/.config/plasma-org.kde.plasma.desktop-appletsrc --group Containments --group 1 --group Wallpaper --group org.kde.image --group General --key FillMode --delete + tags: config - name: Plasma | Set desktop wallpaper ansible.builtin.shell: | - kwriteconfig6 --file ~/.config/plasma-org.kde.plasma.desktop-appletsrc --group Containments --group 1 --group Wallpaper --group org.kde.image --group General --key Image '{{ background_image }}' - kwriteconfig6 --file ~/.config/plasma-org.kde.plasma.desktop-appletsrc --group Containments --group 2 --group Wallpaper --group org.kde.image --group General --key Image '{{ background_image }}' + qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript " + desktops().forEach((d) => { + d.currentConfigGroup = [ + 'Wallpaper', + 'org.kde.image', + 'General', + ] + d.writeConfig('Image', '{{ background_image }}') + d.writeConfig('FillMode', '1') + d.reloadConfig() + }) + " tags: config - name: Plasma | Set Lockscreen wallpaper