⚠️ DEPRECATED: This is an old and inefficient version of the switcher. The new, improved version is available as MagShift Project.
SkySwitcher is a minimalist, context-aware keyboard layout switcher for Linux (Wayland & X11). It fixes what you just typed without making you retype it.
Designed with NixOS Flakes in mind for reproducible and secure deployment.
- ⚡ Double Right Shift: Tap
Right Shifttwice to switch layout (e.g., English ↔ Ukrainian). - 📝 Auto-Correction: It automatically corrects the last typed word when you switch.
- Typed
ghbdsn? -> Double Shift -> Becomesпривіт.
- Typed
- 🎯 Selection Fix: Hold
Right Ctrl+ pressRight Shiftto fix the currently selected text. - 🔒 Secure: Runs with standard user permissions (via
uinputgroup), nosudorequired after setup. - ❄️ Pure Nix: Zero global dependencies. Builds cleanly from the Nix Store.
| Action | Shortcut | Description |
|---|---|---|
| Fix Last Word | Right Shift (x2) |
Selects last word, translates it, replaces text, and switches system layout. |
| Fix Selection | R-Ctrl + R-Shift |
Converts the currently selected text (clipboard-based). |
Since this project exports a NixOS module, installation is clean, but requires an overlay to make the package available to the system.
Add the input, import the module, and apply the overlay in your system configuration:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
# Add SkySwitcher input
skyswitcher.url = "github:OleksandrCEO/SkySwitcher";
# skyswitcher.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, skyswitcher, ... }: {
nixosConfigurations.myhostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
# 1. Import the module
skyswitcher.nixosModules.default
# 2. Add Overlay (Required)
({ pkgs, ... }: {
nixpkgs.overlays = [
(final: prev: {
skyswitcher = skyswitcher.packages.${prev.stdenv.hostPlatform.system}.default;
})
];
})
];
};
};
}
You simply need to enable the service (to install the package) and grant your user permission to use input devices.
{ config, pkgs, ... }:
{
# 1. Enable SkySwitcher package installation
services.skyswitcher.enable = true;
# 2. Grant Permissions (CRITICAL)
# The user needs to be in 'input' (to read keys) and 'uinput' (to write keys).
users.users.your_username = {
isNormalUser = true;
extraGroups = [ "wheel" "input" "uinput" ];
};
}
Note: After rebuilding (
sudo nixos-rebuild switch), you MUST reboot or log out/in for group permissions (uinput) to take effect.
Since this tool relies on the graphical session (Wayland/X11) and clipboard, the most reliable way to start it is via KDE settings.
- Open System Settings (Системні параметри) -> Autostart (Автозапуск).
- Click + Add New (+ Додати нове) -> Application... (Програма...).
- Do not select "Login Script".
- Type
skyswitcherin the search bar and press Apply (Гаразд).
That's it! SkySwitcher will now start automatically with your user session.
If you want to run it manually for debugging or development:
# Enter the development shell
nix develop
# Run with verbose logging to see key events
python3 main.py --verbose
# List available input devices (keyboads)
python3 main.py --list
MIT License. Feel free to use and modify.