Set desktop and lockscreen wallpaper to background_image

This commit is contained in:
exu 2024-10-15 20:56:26 +02:00
parent 7eb018f3de
commit d51ca11ac0
3 changed files with 26 additions and 0 deletions

View File

@ -1,2 +1,5 @@
--- ---
# path to ssh key for git servers
ssh_key_git: "{{ ansible_user_dir }}/.ssh/id_ed25519_git" ssh_key_git: "{{ ansible_user_dir }}/.ssh/id_ed25519_git"
# desktop background image
background_image: "{{ ansible_user_dir }}/Bilder/Art/artstation/dk-lan/artstation_14224733_55806391_月半与鬼哭.jpg"

View File

@ -285,3 +285,7 @@
cmd: "~/.config/emacs/bin/doom sync" cmd: "~/.config/emacs/bin/doom sync"
when: doom_emacs.stat.exists when: doom_emacs.stat.exists
tags: config tags: config
- name: Include Tasks from plasma.yml
ansible.builtin.include_tasks:
file: plasma.yml

View File

@ -0,0 +1,19 @@
---
- name: 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', 'file://{{ background_image }}')
d.reloadConfig()
})
"
- name: Set Lockscreen wallpaper
ansible.builtin.shell: |
kwriteconfig6 --file ~/.config/kscreenlockerrc --group Greeter --group Wallpaper --group org.kde.image --group General --key Image '{{ background_image }}'
kwriteconfig6 --file ~/.config/kscreenlockerrc --group Greeter --group Wallpaper --group org.kde.image --group General --key PreviewImage '{{ background_image }}'