sway: add propagate --to-code for modes (#2176)
Propagates the bindkeysToCode setting which adds --to-code to the keybindings in mode configs. Closes #2174
This commit is contained in:
parent
775cb20bd4
commit
f56a087cbc
6 changed files with 151 additions and 6 deletions
|
|
@ -179,7 +179,7 @@ let
|
|||
${keybindingsStr { keybindings = keybindingDefaultWorkspace; }}
|
||||
${keybindingsStr { keybindings = keybindingsRest; }}
|
||||
${keycodebindingsStr keycodebindings}
|
||||
${concatStringsSep "\n" (mapAttrsToList modeStr modes)}
|
||||
${concatStringsSep "\n" (mapAttrsToList (modeStr false) modes)}
|
||||
${concatStringsSep "\n" (mapAttrsToList assignStr assigns)}
|
||||
${concatStringsSep "\n" (map barStr bars)}
|
||||
${optionalString (gaps != null) gapsStr}
|
||||
|
|
|
|||
|
|
@ -37,9 +37,12 @@ rec {
|
|||
];
|
||||
barColorSetStr = c: concatStringsSep " " [ c.border c.background c.text ];
|
||||
|
||||
modeStr = name: keybindings: ''
|
||||
modeStr = bindkeysToCode: name: keybindings: ''
|
||||
mode "${name}" {
|
||||
${keybindingsStr { inherit keybindings; }}
|
||||
${keybindingsStr {
|
||||
inherit keybindings;
|
||||
bindsymArgs = lib.optionalString bindkeysToCode "--to-code";
|
||||
}}
|
||||
}
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ let
|
|||
mapAttrsToList inputStr input # inputs
|
||||
++ mapAttrsToList outputStr output # outputs
|
||||
++ mapAttrsToList seatStr seat # seats
|
||||
++ mapAttrsToList modeStr modes # modes
|
||||
++ mapAttrsToList (modeStr cfg.config.bindkeysToCode) modes # modes
|
||||
++ mapAttrsToList assignStr assigns # assigns
|
||||
++ map barStr bars # bars
|
||||
++ optional (gaps != null) gapsStr # gaps
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue