diff --git a/roles/config/defaults/main.yml b/roles/config/defaults/main.yml index 7c8d97e2..cc5f1172 100644 --- a/roles/config/defaults/main.yml +++ b/roles/config/defaults/main.yml @@ -1,2 +1,5 @@ --- +# path to ssh key for git servers 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" diff --git a/roles/config/tasks/main.yml b/roles/config/tasks/main.yml index 8658a64f..6d7f2336 100644 --- a/roles/config/tasks/main.yml +++ b/roles/config/tasks/main.yml @@ -285,3 +285,7 @@ cmd: "~/.config/emacs/bin/doom sync" when: doom_emacs.stat.exists tags: config + +- name: Include Tasks from plasma.yml + ansible.builtin.include_tasks: + file: plasma.yml diff --git a/roles/config/tasks/plasma.yml b/roles/config/tasks/plasma.yml new file mode 100644 index 00000000..eae2595f --- /dev/null +++ b/roles/config/tasks/plasma.yml @@ -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 }}'