Avoid validation problem fot keybinding file
This commit is contained in:
parent
3c82bbce9a
commit
3a4df1d28a
4 changed files with 37 additions and 14 deletions
20
README.md
20
README.md
|
@ -65,7 +65,25 @@ sway_inputs:
|
||||||
|
|
||||||
### Keybinding
|
### Keybinding
|
||||||
|
|
||||||
Manage keybinding
|
Keybinding require two variables: `sway_keys_variables` and `sway_keybindings`.
|
||||||
|
`sway_keys_variables` defined variables for keybinding. Because configuration
|
||||||
|
file checking throw an error if the first argument of `bindsym` contains a
|
||||||
|
variable not defined is the file (because `10-variables.config` is not included
|
||||||
|
when testing)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
sway_keys_variables:
|
||||||
|
- name: '$left'
|
||||||
|
value: 'h'
|
||||||
|
- name: '$down'
|
||||||
|
value: 'j'
|
||||||
|
- name: '$up'
|
||||||
|
value: 'k'
|
||||||
|
- name: '$right'
|
||||||
|
value: 'l'
|
||||||
|
- name: '$mod'
|
||||||
|
value: 'Mod4'
|
||||||
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
sway_keybindings:
|
sway_keybindings:
|
||||||
|
|
|
@ -1,4 +1,16 @@
|
||||||
---
|
---
|
||||||
|
sway_keys_variables:
|
||||||
|
- name: '$left'
|
||||||
|
value: 'h'
|
||||||
|
- name: '$down'
|
||||||
|
value: 'j'
|
||||||
|
- name: '$up'
|
||||||
|
value: 'k'
|
||||||
|
- name: '$right'
|
||||||
|
value: 'l'
|
||||||
|
- name: '$mod'
|
||||||
|
value: 'Mod4'
|
||||||
|
|
||||||
sway_keybindings:
|
sway_keybindings:
|
||||||
- mode: 'normal'
|
- mode: 'normal'
|
||||||
bindings:
|
bindings:
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
---
|
---
|
||||||
sway_variables:
|
sway_variables:
|
||||||
- name: '$left'
|
|
||||||
value: 'h'
|
|
||||||
- name: '$down'
|
|
||||||
value: 'j'
|
|
||||||
- name: '$up'
|
|
||||||
value: 'k'
|
|
||||||
- name: '$right'
|
|
||||||
value: 'l'
|
|
||||||
- name: '$term'
|
- name: '$term'
|
||||||
value: 'foot'
|
value: 'foot'
|
||||||
- name: '$menu'
|
- name: '$menu'
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
set $mod Mod4
|
# Keys variables
|
||||||
set $left h
|
{% if sway_keys_variables %}
|
||||||
set $down j
|
{% for v in sway_keys_variables %}
|
||||||
set $up k
|
set {{ v.name }} {{ v.value}}
|
||||||
set $right l
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Dynamic workspace keybindings
|
# Dynamic workspace keybindings
|
||||||
{% for k,v in sway_workspaces.items() %}
|
{% for k,v in sway_workspaces.items() %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue