Raycast is a blazingly fast, totally extendable launcher.
Langch seamlessly integrates with Raycast, providing a convenient way to manage keyboard layouts using Raycast commands.
To use custom keybindings for layouts, you need to disable system default shortcuts. In System Preferences > Keyboard
, change the Option Press the Glob key to
to do nothing
and disable the shortcuts in Keyboard Shortcuts > Input Sources
.
-
Open your preferred text editor.
-
Create a new file for each layout script, for example:
langch-us.sh
for the US keyboard layout.langch-de.sh
for the German keyboard layout.langch-uk.sh
for the Ukrainian keyboard layout.langch-ru.sh
for the Russian keyboard layout.
-
In each script file, add the following command:
#!/bin/bash # Required parameters: # @raycast.schemaVersion 1 # @raycast.title Layout US # @raycast.mode silent # Optional parameters: # @raycast.icon 🤖 langch ch --force --silent <layoutID> # Replace <layoutID> with the desired keyboard layout ID
-
Save each script file.
-
Make the scripts executable using
chmod +x
.
Check examples in ../examples/raycast
- Open Raycast Preferences.
- Navigate to the "Extensions" tab.
- Click on the "+" button and select "Add script Directory."
- Choose the directory where you saved your Langch scripts.
- Now, you can use Raycast to easily switch between layouts by executing your custom scripts.
Adjust the keybindings according to your preferences.