catbus

Crates.iocatbus
lib.rscatbus
version0.1.0
created_at2026-01-18 20:12:02.126034+00
updated_at2026-01-18 20:12:02.126034+00
descriptionA Wayland IME for multilingual text input
homepage
repositoryhttps://codeberg.org/mikklee/catbus
max_upload_size
id2053010
size292,497
Michael Lee (mikklee)

documentation

README

Catbus

An opinionated native Wayland IME (Input Method Editor) for multilingual text input. Hold a trigger key (default: CapsLock) and press another key to access alternate characters, switch keyboard layouts, or enter Japanese text via SKK.

This is made to be used with a typical US ANSI keyboard, so mappings have to be configured with that as the base.

It's not really a bus in the traditional sense. Eg. ibus. It does not by itself support making extensions on top of it, nor does it provide a system bus for you so send events to. However, since the default trigger is caps-lock, it can replace ibus, and cats/Ghibli are cool: catbus (capslock type bus).

Features

  • Variant contexts - Hold trigger + key to type accented characters (e.g., aå, ą, á)
  • Layout switching - Switch between QWERTY, Workman, Colemak, etc. on the fly
  • Japanese input - SKK (Simple Kana to Kanji) input method with candidate selection
  • System tray - Shows current layout and context (dbus based)
  • Configurable trigger key - CapsLock, RightAlt, Meta, ScrollLock, or NumLock

Why?

International input can be difficult, and it gets worse if you use a custom layout like Dvorak, Colemak or Workman on a US ANSI keyboard. On a traditional Linux desktop you can use a variant of the US Intl. XKB keyboard layout, but this has major downsides. For once, it uses dead-keys. This makes characters like apostrophes hard to use by default.

A solution is to use an IME. Ibus is still a poor experience on Wayland, and fcitx5 is overly complex and also has a tendency to get stuck and relies on QT. Both of them feel like they were build for a different era, and ported to work on Wayland. None of them differ between a keyboard layout and and actual input. If you want workman and intl, you will have to implement a custom setting. Loading this setting is not always straight forward. None of them really give you a true unicode keyboard.

Moreover, when did it make sense that to write

Requirements

  • Wayland compositor with zwp_input_method_v2 support (Sway, niri, etc.)
  • libwayland-client
  • libxkbcommon (only for Japanese input)
  • SKK dictionary file (only for Japanese input)

Installation

cargo install catbus

Usage

catbus

You will need to configure your desktop environment to start catbus.

GNOME / KDE

Create ~/.config/autostart/catbus.desktop:

[Desktop Entry]
Type=Application
Name=Catbus
Exec=catbus

Hyprland

Add to ~/.config/hypr/hyprland.conf:

exec-once = catbus

niri

Add to ~/.config/niri/config.kdl:

spawn-at-startup "catbus"

Sway

Add to ~/.config/sway/config:

exec catbus

Place your configuration at ~/.config/catbus/config.toml. See example/config.toml for a full example.

Configuration

# Trigger key (default: capslock)
# Options: capslock, rightalt/altgr, leftmeta/super, rightmeta, scrolllock, numlock
trigger_key = "capslock"

# Layouts - switch with trigger + F-key
[layouts.workman]
trigger = "caps+f1"
label = "Workman"
[layouts.workman.remap]
w = "d"
e = "r"
# ... (keys that differ from QWERTY)

# Variant contexts - switch with trigger + number
[contexts.norwegian]
trigger = "caps+1"
label = "🇳🇴"
[contexts.norwegian.variants]
a = "å" # trigger + a = å
o = "ø"
e = "æ"

# Japanese SKK context
[contexts.japanese]
trigger = "caps+7"
type = "skk"
label = "🇯🇵"

# Clear context
[clear]
trigger = "caps+0"

Key Bindings

While holding the trigger key:

Key Action
F1-F12 Switch keyboard layout
1-9 Switch variant context
0 Clear context (return to default)
ESC Clear layout (return to QWERTY)
Letter Type variant character (if context active)

In SKK mode (without trigger held):

Key Action
Letter Build reading (romaji to hiragana)
Shift+Letter Start kanji conversion
Space Convert / next candidate
1-9 Select candidate
Enter Confirm
Ctrl+G Cancel

Features

Disable features

# Build without Japanese support
cargo build --release --no-default-features

SKK Dictionary

Set the SKK_DICT_PATH environment variable to your SKK dictionary:

export SKK_DICT_PATH=/usr/share/skk/SKK-JISYO.L

Acknowledgments

Japanese input is powered by cskk, a Rust implementation of SKK (Simple Kana to Kanji

License

GPL v3.0

Contributions

Are welcome :)

Commit count: 33

cargo fmt