Add variables templates
This commit is contained in:
parent
50c485a8cf
commit
4cc219cec0
4 changed files with 27 additions and 0 deletions
14
defaults/main/variables.yml
Normal file
14
defaults/main/variables.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
sway_variables:
|
||||
- name: '$left'
|
||||
value: 'h'
|
||||
- name: '$down'
|
||||
value: 'j'
|
||||
- name: '$up'
|
||||
value: 'k'
|
||||
- name: '$right'
|
||||
value: 'l'
|
||||
- name: '$term'
|
||||
value: 'foot'
|
||||
- name: '$menu'
|
||||
value: 'dmenu_path | dmenu | xargs swaymsg exec --'
|
1
files/90-startup.config
Normal file
1
files/90-startup.config
Normal file
|
@ -0,0 +1 @@
|
|||
exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"
|
|
@ -38,9 +38,16 @@
|
|||
validate: >-
|
||||
sh -c "if sway --config %s --validate 2>&1 | grep -q sway/config.c; then >&2 echo \"Error validating sway configuration\"; exit 1; else exit 0; fi"
|
||||
loop:
|
||||
- 00-variables
|
||||
- 10-input
|
||||
- 20-output
|
||||
- 30-theme
|
||||
- 40-workspaces
|
||||
- 50-keybindings
|
||||
any_errors_fatal: true
|
||||
|
||||
- name: Copy default startup Sway conf file
|
||||
ansible.builtin.copy:
|
||||
src: '90-startup.config'
|
||||
dest: '{{ ansible_user_dir }}/.config/systemd/user/'
|
||||
mode: 0640
|
||||
|
|
5
templates/00-variables.config.j2
Normal file
5
templates/00-variables.config.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% if sway_variables %}
|
||||
{% for v in sway_variables %}
|
||||
set {{ v.name }} {{ v.value}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue