A lightweight system utility to port the behavior of macOS style language switching to GNOME Linux (supporting both Wayland and X11 sessions).
Tapping the Left Control key switches the input layout to English, and tapping the Right Control key cycles through alternative layouts (Russian, Ukrainian, etc.). It runs as a low-level background daemon and includes a native GTK4/Libadwaita configuration interface.
Since this utility uses a native GTK4/Libadwaita interface, make sure the required development libraries are installed on your Linux machine:
- Ubuntu / Debian:
sudo apt update sudo apt install -y libgtk-4-dev libadwaita-1-dev build-essential pkg-config
- Fedora:
sudo dnf install -y gtk4-devel libadwaita-devel pkgconfig
- Download the latest pre-compiled binary:
wget https://github.com/OleksiyM/LinuxLngSwitcher/releases/download/latest/gnome-lng-switcher
- Grant execution permissions:
chmod +x gnome-lng-switcher
To capture low-level keyboard keys (like standalone Control keys) on Wayland and X11 without using sudo, your user needs permission to read /dev/input/ events:
- Add your user to the system
inputgroup:sudo usermod -aG input $USER - Crucial: You must Log Out of your desktop session and Log Back In (or reboot your PC) for the new group permissions to apply.
Modern GNOME Shell sessions restrict programmatic layout switching. We use a tiny helper extension as a D-Bus bridge.
- Launch the configuration GUI:
./gnome-lng-switcher
- In the Access & Daemon Status section, locate the GNOME Extension Helper row and click the «Enable Helper» button.
- Log Out and Log Back In one more time. This is mandatory so GNOME Shell can discover the newly created extension directory on the disk and load it in memory.
- Launch the utility again:
./gnome-lng-switcher
- Ensure all top indicators are green:
- Accessibility Access: Active
- GNOME Extension Helper: Active
- Select your desired behaviors:
- Left Control: Choose your default language (usually US English).
- Right Control: Check the layout options you want to cycle through (e.g. Russian, Ukrainian).
- Click «Start Daemon» to launch the background event listener service.
- (Optional) Turn on Launch at Login to autostart the switcher silently when you boot your PC.
- Click the «Close» button in the header bar. The settings window will close, but the key listener daemon will keep running silently in the background.
If you launch the daemon from the GUI, it automatically detaches from the terminal and continues running silently in the background.
If you prefer to start the daemon manually from the terminal and want it to persist after closing the terminal window, use one of the following commands:
./gnome-lng-switcher --daemon >/dev/null 2>&1 & disownnohup ./gnome-lng-switcher --daemon >/dev/null 2>&1 &If you have custom system display scale configurations (e.g., fractional scaling or high DPI screens) and the GUI window has small scrollbars, you can override its default dimensions manually.
Open your local configuration file at ~/.config/gnome-lng-switcher/config.json and add the custom size parameters:
{
"left_ctrl_layout": 0,
"right_ctrl_layouts": [1],
"sensitivity_ms": 300,
"window_width": 540,
"window_height": 724
}window_width(optional): Width of the settings window in pixels (default fallback:540).window_height(optional): Height of the settings window in pixels (default fallback:660).