Add wallpaper

main
Micke Nordin 10 months ago
parent 116f44fe56
commit 3d5908613b

@ -2,6 +2,7 @@
- name: Set up sway - name: Set up sway
vars: vars:
uid: "{{ lookup('env','USER') }}" uid: "{{ lookup('env','USER') }}"
wallpaper_path: /home/{{ uid }}/.config/wallpaper/savannah-landscape-with-acacia-trees.jpeg
hosts: localhost hosts: localhost
connection: local connection: local
become: false become: false
@ -21,6 +22,7 @@
owner: "{{ uid }}" owner: "{{ uid }}"
group: "{{ uid }}" group: "{{ uid }}"
mode: '0640' mode: '0640'
notify: Reload sway
- name: Create waybar dir - name: Create waybar dir
ansible.builtin.file: ansible.builtin.file:
dest: "/home/{{ uid }}/.config/waybar" dest: "/home/{{ uid }}/.config/waybar"
@ -32,3 +34,19 @@
owner: "{{ uid }}" owner: "{{ uid }}"
group: "{{ uid }}" group: "{{ uid }}"
mode: '0640' mode: '0640'
notify: Reload sway
- name: Create wallpaper dir
ansible.builtin.file:
dest: /home/{{ uid }}/.config/wallpaper
state: directory
# Image by upklyak on Freepik
# https://www.freepik.com/free-vector/savannah-landscape-with-acacia-trees-night-vector-cartoon-illustration-african-savanna-with-full-moon-stars-dark-sky-concept-safari-vacation-trip-travel_25694514.htm
- name: Setup wall paper
ansible.builtin.copy:
dest: '{{ wallpaper_path }}'
src: ../data/savannah-landscape-with-acacia-trees.jpeg
notify: Reload sway
handlers:
- name: Reload sway
ansible.builtin.command:
cmd: swaymsg reload

@ -30,7 +30,7 @@ include /etc/sway/config-vars.d/*
### Output configuration ### Output configuration
# #
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill output * bg {{ wallpaper_path }} fill
# #
# Example configuration: # Example configuration:
# #
@ -244,7 +244,6 @@ exec_always {
} }
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
bindsym $mod+Shift+s mode $screenshot_mode bindsym $mod+Shift+s mode $screenshot_mode
mode $screenshot_mode { mode $screenshot_mode {
# Screenshots: # Screenshots:

Loading…
Cancel
Save