Skip to content

Repository files navigation

Google Input Tools for Linux — Nepali Phonetic Typing

Type Nepali anywhere on Linux — just spell it the way it sounds. Write mero, get मेरो. Write namaste, get नमस्ते. This is a system-wide input method that turns romanized text into Devanagari on the fly, with live word suggestions in every app — your browser, office suite, chat, and terminal.

📖 Project site: https://palniraj.github.io/google-input-tools-linux/

License: MIT Platform Python PPA

mero            →  मेरो
nama            →  नाम
mero nama niraj pal ho   →  मेरो नाम निरज पाल हो

Demo:

Typing Nepali phonetically with Google Input Tools for Linux


Contents

Features

  • Phonetic (romanized) Nepali — type kura, choose from कुरा / कुर / कूरा …
  • Works everywhere — browsers, LibreOffice, editors, terminals, chat apps.
  • English stays your default; switch to Nepali with a shortcut (Ctrl+Space).
  • Top-bar indicator — GNOME shows en / ने next to the Wi-Fi area.
  • One-command setupnepali-input-enable configures everything.
  • Lightweight — pure Python 3 on top of IBus; no heavy runtime.

Install

Ubuntu (PPA) — recommended

sudo add-apt-repository ppa:nirajpal/nepali-input
sudo apt update
sudo apt install ibus-google-nepali
nepali-input-enable      # run as your normal user, NOT with sudo

Built for current Ubuntu releases. If your release has no build yet, use Build from source below.

Debian / Ubuntu (.deb)

Grab the .deb from the releases page:

sudo apt install ./ibus-google-nepali_*.deb
nepali-input-enable

From source

git clone https://github.com/palniraj/google-input-tools-linux.git
cd google-input-tools-linux
sudo ./install.sh        # installs the engine + auto-configures English + Nepali

Getting started

After installing, enable it for your user (this adds Nepali next to English and sets the switch shortcut):

nepali-input-enable

You can also launch “Google Input Tools (Nepali)” from the applications menu. Then, in any app:

  1. Press Ctrl+Space to switch to Nepali (the top bar shows ने).
  2. Type phonetically, e.g. mero.
  3. Pick a candidate with a number key or Space.
  4. Press Ctrl+Space again to go back to English.

Key bindings

Key Action
letters a–z build the romanized word (shown underlined)
19 commit the numbered candidate on the current page
Space commit the highlighted candidate and add a space
Enter commit the highlighted candidate (no space)
↑ ↓ / ← → move the highlight
Page Up / Page Down (or - / =) previous / next page of candidates
Backspace delete the last romanized letter
Esc cancel the current word
/ insert the Nepali purnabiram

When there's no word in progress, every key behaves normally.

Configuration

Input sources and the switch shortcut are per-user settings, so these run without sudo:

nepali-input-enable                 # add Nepali, switch key = Ctrl+Space (default)
nepali-input-enable '<Super>space'  # use a different switch shortcut
nepali-input-disable                # remove Nepali from the switcher

From a source checkout the same helpers are ./enable.sh and ./disable.sh.

Why Ctrl+Space? GNOME's stock Super+Space doesn't work on every laptop, so Ctrl+Space is the default and Super+Space is kept as a backup. Pick whatever suits your keyboard.

How it works

key events ─▶ IBus engine (src/engine.py)
                 │  builds a romanized preedit
                 │  async HTTPS lookup on a worker thread
                 ▼
        Google Input Tools API (src/google_ime.py)
        inputtools.google.com/request?ime=transliteration_en_ne
                 │  returns Devanagari candidates
                 ▼
        candidate popup ─▶ you choose ─▶ text committed into the focused app

The cloud lookup runs off the GLib main loop and posts results back with a sequence number, so fast typing never blocks or flickers.

Build from source

Binary .deb

packaging/deb/build-deb.sh          # → dist/ibus-google-nepali_<version>_all.deb

Requires only dpkg-deb; no root needed.

Source package / PPA (maintainers)

sudo apt install devscripts debhelper dput dpkg-dev
debuild -S -sa
dput ppa:nirajpal/nepali-input ../ibus-google-nepali_<version>_source.changes

Each Ubuntu release needs its own debian/changelog entry with a unique version (e.g. 1.0.0~noble1, 1.0.0~resolute1). Uploads must be signed with a GPG key registered to your Launchpad account.

Troubleshooting

  • Nepali doesn't appear in the switcher. Run nepali-input-enable. If it still doesn't show, log out and back in so GNOME reloads input sources.
  • Ctrl+Space does nothing. Some apps grab it; set another shortcut with nepali-input-enable '<Super>space' (or any combo you like).
  • No candidates / only roman text appears. The transliteration is a cloud service — check your internet connection.
  • apt says the repo “is not signed” / 404. There's no build for your Ubuntu release yet; install from source meanwhile.

Limitations

  • Needs an internet connection. Transliteration is a cloud service; offline, the engine commits your raw romanized text instead.
  • Relies on Google's public Input Tools endpoint, which is undocumented and may change. This project is not affiliated with Google.

Contributing

This project is open for contributors — bug reports, features, packaging for more distros, or docs are all welcome. Open an issue or a pull request. Please run the smoke tests first:

python3 tests/test_engine.py

Acknowledgements

Transliteration is powered by Google Input Tools. This project is not affiliated with Google.

Built with ❤️ for the Nepali Linux community by Niraj Pal.

License

MIT — see LICENSE.

About

Google Input Tools for Linux. Easy way to type Nepali in Linux. Type romanized text like "mero" and get मेरो in any app — browser, LibreOffice, terminal — via IBus, powered by Google Input Tools. Install from PPA or .deb.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages