Mac: swich language alternatives (Karabiner script)

Option-Shift (Windows)

Karabiner-Elements script to:
Switch “en” <-> “he” language using Option-Shift, like in Windows

We change the Keyboard shortcut to switch input source to Ctrl-Option-Shift-0. The Karabiner script will capture Option-Shift and replace it with this new shortcut.
Open System Settings -> Keyboard -> Keyboard Shortcuts -> Input Sources. Then replace the next (or previous) source shortcut with Ctrl-Option-Shift-0.
Then add the following script to Karabiner:

"{
    "description": "Shift switch input method",
    "manipulators": [
        {
            "from": {
                "key_code": "left_shift",
                "modifiers": { "mandatory": ["left_option"] }
            },
            "to": [
                {
                    "key_code": "left_shift",
                    "lazy": true,
                    "modifiers": ["left_option"]
                }
            ],
            "to_if_alone": [
                {
                    "key_code": "0",
                    "modifiers": ["left_control", "left_shift", "left_option"]
                }
            ],
            "type": "basic"
        }
    ]
}

CapsLock

Karabiner-Elements script to:
Switch “en” <-> “he” language using CapsLock.
Shift-CapsLock -> CapsLock

"rules": [
{
    "description": "caps_lock switch en <-> he (grebulon)",
    "manipulators": [
        {
            "from": {
                "key_code": "caps_lock",
                "modifiers": {
                    "mandatory": [
                        "shift"
                    ],
                    "optional": [
                        "caps_lock"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "caps_lock"
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "input_sources": [
                        {
                            "language": "en"
                        }
                    ],
                    "type": "input_source_if"
                }
            ],
            "from": {
                "key_code": "caps_lock",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "select_input_source": {
                        "language": "he"
                    }
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "input_sources": [
                        {
                            "language": "he"
                        }
                    ],
                    "type": "input_source_if"
                }
            ],
            "from": {
                "key_code": "caps_lock",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "select_input_source": {
                        "language": "en"
                    }
                }
            ],
            "type": "basic"
        }
    ]
}
]