Select text. Hit a hotkey. Get a translation.
A no-friction translator for Ubuntu (GNOME/Wayland) and macOS, powered by MiniMax.
Most desktop translators are clunky: open the app, paste text, click translate, copy back. This one is one keystroke.
git clone https://github.com/gaoxiaowei2117/super-e-translator.git
cd super-e-translator
./install.shinstall.sh auto-detects your OS and dispatches to install-linux.sh or install-macos.sh.
After install, drop your MiniMax API key into the config:
$EDITOR ~/.config/translator/config.tomlThe Linux installer:
- ✅ installs apt deps (
python3-gi,gir1.2-gtk-4.0,wl-clipboard,libnotify-bin,gnome-screenshot,pipx) - ✅ installs the
translatorcommand into~/.local/binviapipx(with--system-site-packagesso the venv can use the apt-installed PyGObject) - ✅ registers Super+E (text) and Super+R (screenshot) as GNOME custom keybindings via
gsettings
The macOS installer:
- ✅ installs
python-tk+pipxfrom Homebrew, andskhdfrom thekoekeishiya/formulaetap (Tkinter for the popup, skhd for global hotkeys — no GTK needed) - ✅ installs
translatorandtranslator-imageinto~/.local/binviapipx - ✅ writes ⌘⌃E and ⌘⌃R bindings into
~/.config/skhd/skhdrcand starts the skhd launchd service
The first time you press a hotkey, macOS prompts for Accessibility permission — twice:
- For skhd, so it can listen for the global hotkey.
- For the translator binary, so it can send ⌘C to the focused app to grab your selection.
Grant both under System Settings → Privacy & Security → Accessibility. After that, hotkeys work everywhere.
To change a binding later, edit ~/.config/skhd/skhdrc and run skhd --restart-service.
(⌘E alone is "Use Selection for Find" in most apps and ⌘⌥E clashes with a few pro apps' bindings, so we default to ⌘⌃E — almost nothing uses it.)
- Select English (or Chinese) text anywhere — browser, terminal, IDE.
- Press your hotkey (Super+E on Linux / ⌘⌃E on macOS).
- A small popup appears with the translation.
- Esc — close
- "复制译文" — copy result
Direction is auto-detected: ≥30% Chinese characters → translate to English; otherwise → translate to Chinese.
For a single English word, you get a dictionary entry (IPA + POS-grouped meanings) instead of a sentence translation.
For images: press Super+R (Linux) / ⌘⌃R (macOS), drag-select a region, get a translation of the text inside.
~/.config/translator/config.toml:
api_key = "your-minimax-key"
model = "MiniMax-M2.5-highspeed"
endpoint = "https://api.minimaxi.com/anthropic/v1/messages"model and endpoint are optional; defaults shown. Other supported models:
| Model | Notes |
|---|---|
MiniMax-M2.7 |
latest, most capable |
MiniMax-M2.7-highspeed |
latest, faster |
MiniMax-M2.5 (default) |
balanced |
MiniMax-M2.5-highspeed |
balanced, faster |
MiniMax-M2.1 |
older |
MiniMax-M2.1-highspeed |
older, faster |
MiniMax-M2 |
original |
All go through the same Anthropic-style endpoint.
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest -vTests cover both Linux and macOS backends — the platform-specific bits dispatch via sys.platform and each backend is tested independently.
- Linux: popup position is controlled by the Wayland compositor — usually centered on the active monitor. A few GTK4 apps don't write to the PRIMARY selection; if selection-via-hotkey doesn't work, try Ctrl+C first.
- macOS: requires Accessibility permission for the host process (Shortcuts/Terminal/skhd) so the script can dispatch ⌘C to grab your selection. Granted once, persists.
- Selections over 2000 characters are truncated.
- Auto-detect more language pairs (es/fr/de/ja → en/zh)
- Streaming output for long passages
- X11 fallback on Linux (currently Wayland-only)
- Windows port
- Custom popup theme
MIT