diff --git a/README.md b/README.md index 721e78a..16ad771 100644 --- a/README.md +++ b/README.md @@ -64,25 +64,7 @@ sway_inputs: ### 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' -``` +Keybinding require one variables: `sway_keys_variables`. ```yaml sway_keybindings: diff --git a/defaults/main/keybindings.yml b/defaults/main/keybindings.yml index e936ad6..39e0ba5 100644 --- a/defaults/main/keybindings.yml +++ b/defaults/main/keybindings.yml @@ -1,16 +1,4 @@ --- -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: - mode: 'normal' bindings: diff --git a/defaults/main/variables.yml b/defaults/main/variables.yml index ae36d40..35edc48 100644 --- a/defaults/main/variables.yml +++ b/defaults/main/variables.yml @@ -4,3 +4,13 @@ sway_variables: value: 'foot' - name: '$menu' value: 'dmenu_path | dmenu | xargs swaymsg exec --' + - name: '$left' + value: 'h' + - name: '$down' + value: 'j' + - name: '$up' + value: 'k' + - name: '$right' + value: 'l' + - name: '$mod' + value: 'Mod4' diff --git a/templates/50-keybindings.config.j2 b/templates/50-keybindings.config.j2 index 7be13a4..85878d4 100644 --- a/templates/50-keybindings.config.j2 +++ b/templates/50-keybindings.config.j2 @@ -1,10 +1,3 @@ -# Keys variables -{% if sway_keys_variables %} -{% for v in sway_keys_variables %} -set {{ v.name }} {{ v.value}} -{% endfor %} -{% endif %} - # Dynamic workspace keybindings {% for k,v in sway_workspaces.items() %} bindsym $mod+{{ k }} workspace $ws{{ k }}