From 55c104f32058664417368af07e2250d9564fedf5 Mon Sep 17 00:00:00 2001 From: exu Date: Wed, 16 Oct 2024 08:44:52 +0200 Subject: [PATCH] Use kwriteconfig instead of plasma scripting --- roles/config/tasks/plasma.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/roles/config/tasks/plasma.yml b/roles/config/tasks/plasma.yml index 6661e42b..c8d4ef33 100644 --- a/roles/config/tasks/plasma.yml +++ b/roles/config/tasks/plasma.yml @@ -1,17 +1,24 @@ --- +# - 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 | 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.reloadConfig() - }) - " + 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 }}' tags: config - name: Plasma | Set Lockscreen wallpaper