{"id":50824473,"url":"https://github.com/quantavil/text-expander-wayland","last_synced_at":"2026-06-13T17:03:29.154Z","repository":{"id":361075770,"uuid":"1252997706","full_name":"quantavil/text-expander-wayland","owner":"quantavil","description":" A lightweight, minimal, and blazing-fast text expander for Wayland written in Rust.","archived":false,"fork":false,"pushed_at":"2026-05-29T06:09:50.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T06:17:23.800Z","etag":null,"topics":["text-expander"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantavil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-29T04:17:55.000Z","updated_at":"2026-05-29T06:12:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/quantavil/text-expander-wayland","commit_stats":null,"previous_names":["quantavil/text-expander-wayland"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/quantavil/text-expander-wayland","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantavil%2Ftext-expander-wayland","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantavil%2Ftext-expander-wayland/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantavil%2Ftext-expander-wayland/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantavil%2Ftext-expander-wayland/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantavil","download_url":"https://codeload.github.com/quantavil/text-expander-wayland/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantavil%2Ftext-expander-wayland/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34292326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["text-expander"],"created_at":"2026-06-13T17:03:28.185Z","updated_at":"2026-06-13T17:03:29.149Z","avatar_url":"https://github.com/quantavil.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# text_expander\n\nLightweight text expander for Wayland. Built as a minimal replacement for [espanso](https://espanso.org/) that reads espanso-format config files.\n\nIt is extremely resource-efficient, consuming only **~1.7 MB - 3.4 MB** of RAM at runtime (compared to Espanso's 50MB - 100MB+).\n\n### Comparison with Espanso\n\n| Feature | `text_expander` | `espanso` |\n|---------|-----------------|-----------|\n| **Memory Usage** | **~1.7 MB - 3.4 MB RAM** | ~50 MB - 120 MB RAM |\n| **Process Model** | Single minimal daemon | Multiple daemon \u0026 worker processes |\n| **Wayland Integration** | Native (via `ydotool` / `wtype`) | Native/XWayland (often requires complex setups) |\n| **Config Format** | Espanso-compatible YAML | YAML |\n| **Basic Triggers \u0026 Vars** | Supported (date, shell, clipboard) | Supported |\n| **Advanced Features** | No (Regex triggers, forms, scripts) | Supported |\n| **System Overhead** | Negligible | Moderate |\n\nSupports the most commonly used espanso match features (simple triggers, variables, shell commands). Advanced features like regex triggers, forms, and app-specific configs are not supported.\n\n## Requirements\n\n- Linux + Wayland\n- `wtype` (text injection)\n- `wl-paste` (clipboard variable support)\n- Root access for `/dev/input/event*`\n\n## Build\n\n```bash\ncargo build --release\nsudo cp target/release/text_expander /usr/local/bin/\n```\n\n## Usage\n\n```bash\nsudo text_expander        # foreground\nsudo text_expander -d     # daemon mode\n```\n\n## Config\n\nLocation: `~/.config/text_expander/`\n\nAll `.yml` and `.yaml` files are loaded recursively.\n\n### Syntax (espanso-compatible)\n\n```yaml\nmatches:\n  # Simple replacement\n  - trigger: \":sig\"\n    replace: \"Best regards,\\nJohn\"\n\n  # Multiple triggers for one replacement\n  - triggers: [\":hi\", \":hello\"]\n    replace: \"Hello there!\"\n\n  # Date variable\n  - trigger: \":date\"\n    replace: \"{{date}}\"\n    vars:\n      - name: date\n        type: date\n        params:\n          format: \"%Y-%m-%d\"\n\n  # Shell command\n  - trigger: \":ip\"\n    replace: \"{{ip}}\"\n    vars:\n      - name: ip\n        type: shell\n        params:\n          cmd: \"curl -s ifconfig.me\"\n\n  # Clipboard\n  - trigger: \":paste\"\n    replace: \"{{clip}}\"\n    vars:\n      - name: clip\n        type: clipboard\n```\n\n### Variable Types\n\n| Type | Params | Description |\n|------|--------|-------------|\n| `date` | `format` | strftime format string |\n| `shell` | `cmd` | Shell command output |\n| `clipboard` | - | Current clipboard content (via `wl-paste`) |\n| `echo` | `echo` | Static text |\n\n### Supported espanso Features\n\n- `trigger` (single string) and `triggers` (array of strings)\n- `replace` with `{{variable}}` interpolation\n- `vars` with `date`, `shell`, `clipboard`, and `echo` types\n- `global_vars` for shared variables across matches\n- Recursive YAML file loading\n\n### Not Supported\n\nThese espanso features are intentionally out of scope for this minimal tool:\n\n- Regex triggers, word boundaries, case propagation\n- Forms, choice dialogs, cursor hints (`$|$`)\n- Rich text (markdown/HTML), image pasting\n- App-specific configs, toggle key, search bar\n- Config options (backend, clipboard_threshold, etc.)\n- `random`, `script`, `match` variable types\n\n## Migrating from espanso\n\n```bash\n# Stop espanso\nsystemctl --user stop espanso\n\n# Copy config\nmkdir -p ~/.config/text_expander\ncp -r ~/.config/espanso/* ~/.config/text_expander/\n\n# Remove espanso (optional)\nrm -rf ~/.config/espanso\n```\n\nSimple trigger/replace matches and basic variable types will work as-is. Matches using unsupported features (regex, forms, etc.) will be silently skipped.\n\n## How It Works\n\n1. Reads keyboard input via evdev (prefers virtual keyboards like keyd/kmonad)\n2. Buffers keystrokes and matches against triggers\n3. On match: sends backspaces to delete trigger, types replacement via `wtype`\n\n## Systemd Service\n\n`/etc/systemd/system/text_expander.service`:\n\n```ini\n[Unit]\nDescription=Text Expander\nAfter=graphical.target\n\n[Service]\nExecStart=/usr/local/bin/text_expander\nRestart=always\nEnvironment=SUDO_USER=yourusername\nEnvironment=SUDO_UID=1000\n\n[Install]\nWantedBy=graphical.target\n```\n\n```bash\nsudo systemctl enable --now text_expander\n```\n\n## License\n\n[GPL-3.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantavil%2Ftext-expander-wayland","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantavil%2Ftext-expander-wayland","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantavil%2Ftext-expander-wayland/lists"}