Use conditions in template instead of lineinfile
This commit is contained in:
parent
78c284166d
commit
7801b7bda4
2 changed files with 6 additions and 22 deletions
|
@ -121,22 +121,3 @@
|
||||||
become: true
|
become: true
|
||||||
shell: cd {{ ansible_facts.user_dir }}/.git_clones/i3blocks && make install
|
shell: cd {{ ansible_facts.user_dir }}/.git_clones/i3blocks && make install
|
||||||
when: ansible_facts['distribution'] == 'Debian'
|
when: ansible_facts['distribution'] == 'Debian'
|
||||||
|
|
||||||
- name: Uncomment wallpaper lines for clitip or xkcd
|
|
||||||
lineinfile:
|
|
||||||
path: ~/.config/i3/config
|
|
||||||
regexp: "{{ item }}"
|
|
||||||
line: '\1'
|
|
||||||
backrefs: true
|
|
||||||
with_items:
|
|
||||||
- '^#(exec .*wallpaper\.sh$)'
|
|
||||||
- '^#(exec .* hsetroot -center .*\.png$)'
|
|
||||||
when: wallpaper_type != 'fixed'
|
|
||||||
|
|
||||||
- name: Uncomment wallpaper lines for fixed
|
|
||||||
lineinfile:
|
|
||||||
path: ~/.config/i3/config
|
|
||||||
regexp: '^#(exec .* hsetroot -cover .*current$)'
|
|
||||||
line: '\1'
|
|
||||||
backrefs: true
|
|
||||||
when: wallpaper_type == 'fixed'
|
|
||||||
|
|
|
@ -9,9 +9,12 @@ font pango: Noto Sans 9
|
||||||
floating_modifier $super
|
floating_modifier $super
|
||||||
|
|
||||||
#autostart
|
#autostart
|
||||||
#exec --no-startup-id ~/.local/bin/{{ wallpaper_type }}_wallpaper.sh
|
{% if wallpaper_type == "fixed" %}
|
||||||
#exec --no-startup-id hsetroot -center ~/Pictures/wallpapers/{{ wallpaper_type }}-wallpaper.png
|
exec --no-startup-id hsetroot -cover ~/Pictures/wallpapers/current
|
||||||
#exec --no-startup-id hsetroot -cover ~/Pictures/wallpapers/current
|
{% else %}
|
||||||
|
exec --no-startup-id ~/.local/bin/{{ wallpaper_type }}_wallpaper.sh
|
||||||
|
exec --no-startup-id hsetroot -center ~/Pictures/wallpapers/{{ wallpaper_type }}-wallpaper.png
|
||||||
|
{% endif %}
|
||||||
exec --no-startup-id xsettingsd &
|
exec --no-startup-id xsettingsd &
|
||||||
exec --no-startup-id picom -b --config ~/.config/picom.conf
|
exec --no-startup-id picom -b --config ~/.config/picom.conf
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue