keycomfort 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/keycomfort.js +88 -43
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# KEYCOMFORT
|
|
2
2
|
Comfortable keyboard remaps for Karabiner.
|
|
3
3
|
|
|
4
|
+
> [!WARNING]
|
|
5
|
+
> Keycomfort is still in **beta**.
|
|
6
|
+
> There will be a lot of breaking changes until `v1.*`.
|
|
7
|
+
|
|
4
8
|
## Installation
|
|
5
9
|
Keycomfort is a command line application.
|
|
6
10
|
Install it via NPM with `-g` option.
|
package/dist/keycomfort.js
CHANGED
|
@@ -14337,7 +14337,7 @@ function requireKarabinerge () {
|
|
|
14337
14337
|
karabinerge.unless_var = unless_var;
|
|
14338
14338
|
return karabinerge;
|
|
14339
14339
|
}var name = "keycomfort";
|
|
14340
|
-
var version = "0.
|
|
14340
|
+
var version = "0.8.0";
|
|
14341
14341
|
var description = "Comfortable keyboard remaps for Karabiner/AutoHotKey";
|
|
14342
14342
|
var require$$9 = {
|
|
14343
14343
|
name: name,
|
|
@@ -14949,52 +14949,84 @@ function requireRules () {
|
|
|
14949
14949
|
},
|
|
14950
14950
|
},
|
|
14951
14951
|
|
|
14952
|
-
'mouse
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
14958
|
-
|
|
14959
|
-
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
'mouse wheel up/down'(c, r) {
|
|
14965
|
-
r.cond(if_var(mouse_mode, 1))
|
|
14966
|
-
.cond(if_touched(0));
|
|
14967
|
-
mouse_wheel_v(c, r);
|
|
14968
|
-
},
|
|
14969
|
-
|
|
14970
|
-
'mouse wheel left/right'(c, r) {
|
|
14971
|
-
r.cond(if_var(mouse_mode, 1))
|
|
14972
|
-
.cond(if_touched(0));
|
|
14973
|
-
mouse_wheel_h(c, r);
|
|
14952
|
+
'mouse speed up/down': {
|
|
14953
|
+
'mouse mode: on'(c, r) {
|
|
14954
|
+
if (c.touchpad) r.cond(if_touched(0));
|
|
14955
|
+
r.cond(if_var(mouse_mode, 1));
|
|
14956
|
+
mouse_speed(c, r);
|
|
14957
|
+
},
|
|
14958
|
+
'thumb on touchpad'(c, r) {
|
|
14959
|
+
if (!c.touchpad) return false;
|
|
14960
|
+
r.cond(if_touched(1));
|
|
14961
|
+
mouse_speed(c, r);
|
|
14962
|
+
},
|
|
14974
14963
|
},
|
|
14975
14964
|
|
|
14976
|
-
'
|
|
14977
|
-
r
|
|
14978
|
-
|
|
14965
|
+
'mouse move': {
|
|
14966
|
+
'mouse mode: on'(c, r) {
|
|
14967
|
+
if (c.touchpad) r.cond(if_touched(0));
|
|
14968
|
+
r.cond(if_var(mouse_mode, 1));
|
|
14969
|
+
mouse_move(c, r);
|
|
14970
|
+
},
|
|
14971
|
+
'thumb on touchpad'(c, r) {
|
|
14972
|
+
if (!c.touchpad) return false;
|
|
14973
|
+
r.cond(if_touched(1));
|
|
14974
|
+
mouse_move(c, r);
|
|
14975
|
+
},
|
|
14979
14976
|
},
|
|
14980
14977
|
|
|
14981
|
-
'
|
|
14982
|
-
r
|
|
14983
|
-
|
|
14978
|
+
'mouse buttons': {
|
|
14979
|
+
'mouse mode: on'(c, r) {
|
|
14980
|
+
if (c.touchpad) r.cond(if_touched(0));
|
|
14981
|
+
r.cond(if_var(mouse_mode, 1));
|
|
14982
|
+
mouse_buttons(c, r);
|
|
14983
|
+
},
|
|
14984
|
+
'thumb on touchpad'(c, r) {
|
|
14985
|
+
if (!c.touchpad) return false;
|
|
14986
|
+
r.cond(if_touched(1));
|
|
14987
|
+
mouse_buttons(c, r);
|
|
14988
|
+
},
|
|
14984
14989
|
},
|
|
14985
14990
|
|
|
14986
|
-
'
|
|
14987
|
-
r
|
|
14988
|
-
|
|
14991
|
+
'mouse wheel up/down': {
|
|
14992
|
+
'mouse mode: on'(c, r) {
|
|
14993
|
+
if (c.touchpad) r.cond(if_touched(0));
|
|
14994
|
+
r.cond(if_var(mouse_mode, 1));
|
|
14995
|
+
mouse_wheel_v(c, r);
|
|
14996
|
+
},
|
|
14997
|
+
'thumb on touchpad'(c, r) {
|
|
14998
|
+
if (!c.touchpad) return false;
|
|
14999
|
+
r.cond(if_touched(1));
|
|
15000
|
+
mouse_wheel_v(c, r);
|
|
15001
|
+
},
|
|
14989
15002
|
},
|
|
14990
15003
|
|
|
14991
|
-
'
|
|
14992
|
-
r
|
|
14993
|
-
|
|
15004
|
+
'mouse wheel left/right': {
|
|
15005
|
+
'mouse mode: on'(c, r) {
|
|
15006
|
+
if (c.touchpad) r.cond(if_touched(0));
|
|
15007
|
+
r.cond(if_var(mouse_mode, 1));
|
|
15008
|
+
mouse_wheel_h(c, r);
|
|
15009
|
+
},
|
|
15010
|
+
'thumb on touchpad'(c, r) {
|
|
15011
|
+
if (!c.touchpad) return false;
|
|
15012
|
+
r.cond(if_touched(1));
|
|
15013
|
+
mouse_wheel_h(c, r);
|
|
15014
|
+
},
|
|
14994
15015
|
},
|
|
14995
15016
|
|
|
14996
15017
|
};
|
|
14997
15018
|
|
|
15019
|
+
function mouse_speed(c, r) {
|
|
15020
|
+
r.remap({
|
|
15021
|
+
from: key(c.up, any),
|
|
15022
|
+
to: {mouse_key: {speed_multiplier: c.up_to}}
|
|
15023
|
+
})
|
|
15024
|
+
.remap({
|
|
15025
|
+
from: key(c.down, any),
|
|
15026
|
+
to: {mouse_key: {speed_multiplier: c.down_to}}
|
|
15027
|
+
});
|
|
15028
|
+
}
|
|
15029
|
+
|
|
14998
15030
|
function mouse_move(c, r) {
|
|
14999
15031
|
let speed = Math.round(1536 * c.speed);
|
|
15000
15032
|
r.remap({
|
|
@@ -15013,6 +15045,12 @@ function requireRules () {
|
|
|
15013
15045
|
from: key(c.left, any),
|
|
15014
15046
|
to: {mouse_key: {x: -speed}}
|
|
15015
15047
|
});
|
|
15048
|
+
// if (c.speed2_key) {
|
|
15049
|
+
// r.remap({
|
|
15050
|
+
// from: key(c.speed2_key, any),
|
|
15051
|
+
// to: {mouse_key: {speed_multiplier: c.speed2}}
|
|
15052
|
+
// });
|
|
15053
|
+
// }
|
|
15016
15054
|
}
|
|
15017
15055
|
|
|
15018
15056
|
function mouse_buttons(c, r) {
|
|
@@ -15073,7 +15111,7 @@ function requireMain () {
|
|
|
15073
15111
|
const yaml = require$$6;
|
|
15074
15112
|
const {io, merge, isEmpty} = requireAmekusa_util();
|
|
15075
15113
|
const {
|
|
15076
|
-
RuleSet, Config,
|
|
15114
|
+
Rule, RuleSet, Config,
|
|
15077
15115
|
if_app, unless_app,
|
|
15078
15116
|
} = requireKarabinerge();
|
|
15079
15117
|
|
|
@@ -15108,7 +15146,7 @@ function requireMain () {
|
|
|
15108
15146
|
|
|
15109
15147
|
const pkg = require$$9;
|
|
15110
15148
|
const rules = requireRules();
|
|
15111
|
-
const defaultsYML = "# === KEYCOMFORT CONFIG ===\n# NOTE:\n# 0 means \"No\"\n# 1 means \"Yes\"\n\npaths:\n karabiner:\n save_as: ~/.config/karabiner/assets/complex_modifications/keycomfort.json\n apply_to: ~/.config/karabiner/karabiner.json\n ahk:\n save_as: ~/Desktop/keycomfort.ahk\n apply_to:\n\nvim_like: 0 # prefer vim-like mappings?\n\nrules: # mapping rules\n\n modifier:\n desc: Use [key] as a special modifier key (Required)\n enable: 1\n key: spacebar\n alone: spacebar\n\n cancel modifier:\n desc: Cancel modifier (<modifier>) with [key]\n enable: 1\n key: left_shift\n\n disable modifier:\n desc: Disable modifier (<modifier>) with <modifier> + [key]\n enable: 1\n key: right_shift + escape\n\n enable modifier:\n desc: Enable modifier (<modifier>) with [key]\n enable: 1\n key: right_shift + escape\n\n arrows:\n desc: <modifier> + { [up] / [right] / [down] / [left] } = Up / Right / Down / Left\n enable: 1\n up: e\n right: f\n down: d\n left: s\n\n page up/down:\n desc: <modifier> + { [up] / [down] } = Page Up / Down\n enable: 1\n up: w\n down: r\n\n prev/next word:\n desc: <modifier> + { [prev] / [next] } = Prev / Next Word\n enable: 1\n prev: a\n next: g\n apps:\n sonicpi: 1\n others: 1\n\n line start/end:\n desc: <modifier> + { [start] / [end] } = Line Start / End\n enable: 1\n start: q\n end: t\n apps:\n terminal: 1\n sonicpi: 1\n others: 1\n\n select:\n desc: <modifier> + { [up] / [right] / [down] / [left] } = Select Up / Right / Down / Left\n enable: 1\n up: i\n right: l\n down: k\n left: j\n vim:\n left: h\n down: j\n up: k\n right: l\n\n indent/outdent:\n desc: <modifier> + { [indent] / [outdent] } = Indent / Outdent\n enable: 1\n indent: o\n outdent: u\n\n backspace/delete:\n desc: <modifier> + { [backspace] / [delete] } = Backspace / Delete\n enable: 1\n backspace: n\n delete: m\n\n delete word:\n desc: <modifier> + [key] = Delete Word\n enable: 1\n key: b\n\n edit:\n desc: <modifier> + { [undo] / [cut] / [copy] / [paste] } = Undo / Cut / Copy / Paste\n enable: 1\n undo: z\n cut: x\n copy: c\n paste: v\n\n delete line:\n desc: <modifier> + [key] = Delete Line\n enable: 1\n key: shift + m\n apps:\n atom: 1\n vscode: 1\n eclipse: 1\n\n insert line:\n desc: <modifier> + [key] = New Line Below\n enable: 1\n key: return_or_enter\n apps:\n atom: 1\n vscode: 1\n eclipse: 1\n\n move line:\n desc: <modifier> + { [up] / [down] } = Move Line Up / Down\n enable: 1\n up: shift + i\n down: shift + k\n vim:\n up: shift + k\n down: shift + j\n apps:\n atom: 1\n vscode: 1\n eclipse: 1\n sonicpi: 1\n\n left/right tab:\n desc: <modifier> + { [left] / [right] } = Left / Right Tab\n enable: 1\n left: 2\n right: 3\n apps:\n vscode: 1\n eclipse: 1\n others: 1\n\n close/open tab:\n desc: <modifier> + { [close] / [open] } = Close / Open Tab\n enable: 1\n close: 1\n open: 4\n\n numpad:\n desc: <modifier> + [trigger] = Numpad Mode ([num1]=1, [num5]=5, [num9]=9)\n enable: 1\n trigger: left_control\n\n num0: b\n num1: n\n num2: m\n num3: comma\n\n num4: j\n num5: k\n num6: l\n\n num7: u\n num8: i\n num9: o\n\n slash: 8\n asterisk: 9\n hyphen: 0\n plus: p\n\n enter: slash\n delete: semicolon\n backspace: h\n\n plus/minus:\n desc: <modifier> + { [plus] / [minus] } = Plus / Minus\n enable: 1\n plus: p\n minus: shift + p\n to:\n plus: shift + equal_sign\n minus: hyphen\n\n backslash:\n desc: <modifier> + [from] = Backslash\n enable: 1\n from: slash\n to: backslash\n\n backtick:\n desc: <modifier> + [from] = Backtick\n enable: 1\n from: quote\n to: grave_accent_and_tilde\n\n tilde:\n desc: <modifier> + [from] = Tilde\n enable: 1\n from: hyphen\n to: shift + grave_accent_and_tilde\n\n pipe:\n desc: <modifier> + [from] = Pipe\n enable: 1\n from: 7\n to: shift + backslash\n\n equal:\n desc: <modifier> + [from] = Equal Sign\n enable: 1\n from: semicolon\n to: equal_sign\n\n enter:\n desc: <modifier> + [from] = Enter\n enable: 1\n from: tab\n to: return_or_enter\n\n underscore:\n desc: <modifier> + [from] = Underscore\n enable: 1\n from: period\n to: shift + hyphen\n\n custom:\n desc: <modifier> + Custom Keys\n enable: 1\n rules:\n # Examples\n # - from: p\n # to: shift + equal_sign\n\n remap capslock:\n desc: Caps Lock = [to] / [alone]\n enable: 1\n to: left_control\n alone: escape\n\n remap l-control:\n desc: Left Control = [to] / [alone]\n enable: 1\n to: left_control\n alone: escape\n\n remap r-control:\n desc: Right Control = [to] / [alone]\n enable: 0\n to: right_control\n alone: escape\n\n remap l-command:\n desc: Left Command = [to] / [alone]\n enable: 0\n to: left_command\n alone: left_command\n\n remap r-command:\n desc: Right Command = [to] / [alone]\n enable: 0\n to: right_command\n alone: right_command\n\n remap l-shift:\n desc: Left Shift = [to] / [alone]\n enable: 0\n to: left_shift\n alone: left_shift\n\n remap r-shift:\n desc: Right Shift = [to] / [alone]\n enable: 0\n to: right_shift\n alone: right_shift\n\n mouse mode:\n desc: <modifier> + { [on] / [off] } = Mouse Mode On / Off\n enable: 1\n on: 9\n off: 0\n\n mouse
|
|
15149
|
+
const defaultsYML = "# === KEYCOMFORT CONFIG ===\n# NOTE:\n# 0 means \"No\"\n# 1 means \"Yes\"\n\npaths:\n karabiner:\n save_as: ~/.config/karabiner/assets/complex_modifications/keycomfort.json\n apply_to: ~/.config/karabiner/karabiner.json\n ahk:\n save_as: ~/Desktop/keycomfort.ahk\n apply_to:\n\nvim_like: 0 # prefer vim-like mappings?\n\nrules: # mapping rules\n\n modifier:\n desc: Use [key] as a special modifier key (Required)\n enable: 1\n key: spacebar\n alone: spacebar\n\n cancel modifier:\n desc: Cancel modifier (<modifier>) with [key]\n enable: 1\n key: left_shift\n\n disable modifier:\n desc: Disable modifier (<modifier>) with <modifier> + [key]\n enable: 1\n key: right_shift + escape\n\n enable modifier:\n desc: Enable modifier (<modifier>) with [key]\n enable: 1\n key: right_shift + escape\n\n arrows:\n desc: <modifier> + { [up] / [right] / [down] / [left] } = Up / Right / Down / Left\n enable: 1\n up: e\n right: f\n down: d\n left: s\n\n page up/down:\n desc: <modifier> + { [up] / [down] } = Page Up / Down\n enable: 1\n up: w\n down: r\n\n prev/next word:\n desc: <modifier> + { [prev] / [next] } = Prev / Next Word\n enable: 1\n prev: a\n next: g\n apps:\n sonicpi: 1\n others: 1\n\n line start/end:\n desc: <modifier> + { [start] / [end] } = Line Start / End\n enable: 1\n start: q\n end: t\n apps:\n terminal: 1\n sonicpi: 1\n others: 1\n\n select:\n desc: <modifier> + { [up] / [right] / [down] / [left] } = Select Up / Right / Down / Left\n enable: 1\n up: i\n right: l\n down: k\n left: j\n vim:\n left: h\n down: j\n up: k\n right: l\n\n indent/outdent:\n desc: <modifier> + { [indent] / [outdent] } = Indent / Outdent\n enable: 1\n indent: o\n outdent: u\n\n backspace/delete:\n desc: <modifier> + { [backspace] / [delete] } = Backspace / Delete\n enable: 1\n backspace: n\n delete: m\n\n delete word:\n desc: <modifier> + [key] = Delete Word\n enable: 1\n key: b\n\n edit:\n desc: <modifier> + { [undo] / [cut] / [copy] / [paste] } = Undo / Cut / Copy / Paste\n enable: 1\n undo: z\n cut: x\n copy: c\n paste: v\n\n delete line:\n desc: <modifier> + [key] = Delete Line\n enable: 1\n key: shift + m\n apps:\n atom: 1\n vscode: 1\n eclipse: 1\n\n insert line:\n desc: <modifier> + [key] = New Line Below\n enable: 1\n key: return_or_enter\n apps:\n atom: 1\n vscode: 1\n eclipse: 1\n\n move line:\n desc: <modifier> + { [up] / [down] } = Move Line Up / Down\n enable: 1\n up: shift + i\n down: shift + k\n vim:\n up: shift + k\n down: shift + j\n apps:\n atom: 1\n vscode: 1\n eclipse: 1\n sonicpi: 1\n\n left/right tab:\n desc: <modifier> + { [left] / [right] } = Left / Right Tab\n enable: 1\n left: 2\n right: 3\n apps:\n vscode: 1\n eclipse: 1\n others: 1\n\n close/open tab:\n desc: <modifier> + { [close] / [open] } = Close / Open Tab\n enable: 1\n close: 1\n open: 4\n\n numpad:\n desc: <modifier> + [trigger] = Numpad Mode ([num1]=1, [num5]=5, [num9]=9)\n enable: 1\n trigger: left_control\n\n num0: b\n num1: n\n num2: m\n num3: comma\n\n num4: j\n num5: k\n num6: l\n\n num7: u\n num8: i\n num9: o\n\n slash: 8\n asterisk: 9\n hyphen: 0\n plus: p\n\n enter: slash\n delete: semicolon\n backspace: h\n\n plus/minus:\n desc: <modifier> + { [plus] / [minus] } = Plus / Minus\n enable: 1\n plus: p\n minus: shift + p\n to:\n plus: shift + equal_sign\n minus: hyphen\n\n backslash:\n desc: <modifier> + [from] = Backslash\n enable: 1\n from: slash\n to: backslash\n\n backtick:\n desc: <modifier> + [from] = Backtick\n enable: 1\n from: quote\n to: grave_accent_and_tilde\n\n tilde:\n desc: <modifier> + [from] = Tilde\n enable: 1\n from: hyphen\n to: shift + grave_accent_and_tilde\n\n pipe:\n desc: <modifier> + [from] = Pipe\n enable: 1\n from: 7\n to: shift + backslash\n\n equal:\n desc: <modifier> + [from] = Equal Sign\n enable: 1\n from: semicolon\n to: equal_sign\n\n enter:\n desc: <modifier> + [from] = Enter\n enable: 1\n from: tab\n to: return_or_enter\n\n underscore:\n desc: <modifier> + [from] = Underscore\n enable: 1\n from: period\n to: shift + hyphen\n\n custom:\n desc: <modifier> + Custom Keys\n enable: 1\n rules:\n # Examples\n # - from: p\n # to: shift + equal_sign\n\n remap capslock:\n desc: Caps Lock = [to] / [alone]\n enable: 1\n to: left_control\n alone: escape\n\n remap l-control:\n desc: Left Control = [to] / [alone]\n enable: 1\n to: left_control\n alone: escape\n\n remap r-control:\n desc: Right Control = [to] / [alone]\n enable: 0\n to: right_control\n alone: escape\n\n remap l-command:\n desc: Left Command = [to] / [alone]\n enable: 0\n to: left_command\n alone: left_command\n\n remap r-command:\n desc: Right Command = [to] / [alone]\n enable: 0\n to: right_command\n alone: right_command\n\n remap l-shift:\n desc: Left Shift = [to] / [alone]\n enable: 0\n to: left_shift\n alone: left_shift\n\n remap r-shift:\n desc: Right Shift = [to] / [alone]\n enable: 0\n to: right_shift\n alone: right_shift\n\n mouse mode:\n desc: <modifier> + { [on] / [off] } = Mouse Mode On / Off\n enable: 1\n on: 9\n off: 0\n\n mouse speed up/down:\n desc: (Mouse) [up] / [down] = Mouse Speed Up / Down\n enable: 1\n touchpad: 1\n up: z\n up_to: 2.0\n down: a\n down_to: .5\n\n mouse move:\n desc: (Mouse) [up] / [right] / [down] / [left] = Move Mouse Up / Right / Down / Left\n enable: 1\n touchpad: 1\n up: e\n right: f\n down: d\n left: s\n speed: 1.0\n\n mouse buttons:\n desc: (Mouse) [left] / [middle] / [right] = Mouse Buttons Left / Middle / Right\n enable: 1\n touchpad: 1\n left: j\n middle: m\n right: l\n\n mouse wheel up/down:\n desc: (Mouse) [up] / [down] = Mouse Wheel Up / Down\n enable: 1\n touchpad: 1\n up: i\n down: k\n speed: 1.0\n\n mouse wheel left/right:\n desc: (Mouse) [left] / [right] = Mouse Wheel Left / Right\n enable: 1\n touchpad: 1\n left: h\n right: semicolon\n speed: 1.0\n\n\napps:\n others:\n enable: 1\n\n login:\n enable: 1\n id:\n - com.apple.loginwindow\n\n terminal:\n enable: 1\n id:\n - com.apple.Terminal\n - com.googlecode.iterm2\n - org.alacritty\n exe:\n - cmd.exe\n\n vscode:\n enable: 0\n id:\n - com.microsoft.VSCode\n - com.vscodium\n exe:\n - Code.exe\n\n atom:\n enable: 0\n id:\n - com.github.atom\n - dev.pulsar-edit.pulsar\n\n eclipse:\n enable: 0\n id:\n - org.eclipse.platform.ide\n exe:\n - eclipse.exe\n\n sonicpi:\n enable: 0\n id:\n - net.sonic-pi.app\n\n\nkey_labels: # display names for key codes\n spacebar: Space\n return_or_enter: Enter\n grave_accent_and_tilde: Backtick\n button1: Left Click\n button2: Right Click\n button3: Middle Click\n japanese_eisuu: 英数\n japanese_kana: かな\n\n";
|
|
15112
15150
|
const defaults = yaml.parse(defaultsYML);
|
|
15113
15151
|
const defaultConfig = loc(io.home, '.config', 'keycomfort', 'config.yml');
|
|
15114
15152
|
|
|
@@ -15308,7 +15346,10 @@ function requireMain () {
|
|
|
15308
15346
|
|
|
15309
15347
|
// apply rule
|
|
15310
15348
|
if (typeof rule == 'function') {
|
|
15311
|
-
|
|
15349
|
+
let newRule = new Rule(desc);
|
|
15350
|
+
if (rule(rc, newRule) !== false) {
|
|
15351
|
+
ruleSet.add(newRule);
|
|
15352
|
+
}
|
|
15312
15353
|
return;
|
|
15313
15354
|
}
|
|
15314
15355
|
|
|
@@ -15323,21 +15364,25 @@ function requireMain () {
|
|
|
15323
15364
|
if (!rc.apps[app]) continue; // disabled for this rule
|
|
15324
15365
|
if (isEmpty(apps[app].id)) continue; // no app-id
|
|
15325
15366
|
enabled = enabled.concat(apps[app].id);
|
|
15326
|
-
newRule =
|
|
15367
|
+
newRule = new Rule(desc + ` (${app})`);
|
|
15327
15368
|
newRule.cond(if_app(...apps[app].id));
|
|
15328
|
-
rule.apps[app](rc, newRule)
|
|
15369
|
+
if (rule.apps[app](rc, newRule) !== false) {
|
|
15370
|
+
ruleSet.add(newRule);
|
|
15371
|
+
}
|
|
15329
15372
|
}
|
|
15330
15373
|
if (apps.others.enable && rc.apps.others) {
|
|
15331
|
-
newRule =
|
|
15374
|
+
newRule = new Rule(desc);
|
|
15332
15375
|
if (enabled.length) newRule.cond(unless_app(...enabled));
|
|
15333
|
-
rule.apps.others(rc, newRule)
|
|
15376
|
+
if (rule.apps.others(rc, newRule) !== false) {
|
|
15377
|
+
ruleSet.add(newRule);
|
|
15378
|
+
}
|
|
15334
15379
|
}
|
|
15335
15380
|
delete rule.apps;
|
|
15336
15381
|
}
|
|
15337
15382
|
|
|
15338
15383
|
// apply branching rules
|
|
15339
15384
|
for (let k in rule) {
|
|
15340
|
-
addRule(rule[k], rc, `${desc}
|
|
15385
|
+
addRule(rule[k], rc, `${desc} (${k})`); // RECURSION
|
|
15341
15386
|
}
|
|
15342
15387
|
}
|
|
15343
15388
|
|