arifxdroid / TextSuggest

Simple Linux utility to autocomplete words in the GUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TextSuggest

Simple Linux utility to autocomplete words in the GUI.

TextSuggest in action

Uses Rofi for a simple popup menu.

Uses the English Open Word List for a basic dictionary. You can define custom words, see the note.

Licensed under the GNU GPL 3.

Installation

Packages

Debian/Ubuntu deb package: bharadwaj-raju/packages/TextSuggest/textsuggest_1.0_all.deb

AUR (Arch User Repository): textsuggest-git (https://aur.archlinux.org/packages/textsuggest-git/, maintained by Daniel Sandman (shellkr))

Now, see Post-install

Manual

Make sure you have all the requirements:

  • xdotool
  • xclip
  • rofi (Debian/Ubuntu and Arch package name: rofi)

Now, see Post-install

Post-install

Assign keyboard shortcuts to

  • python3 /path/to/TextSuggest.py
  • python3 /path/to/TextSuggest.py --noselect

NOTE: If you installed TextSuggest through the deb package, replace python3 /path/to/TextSuggest.py with just textsuggest.

The first one gives you suggestions on the currently highlighted word. The second one simply gives you a list of all word, you can search through them.

The script stores frequently used words in a history file (~/.textsuggest_history.txt). Suggestions more often used are at the top of list.

TIP: You can search for words by their parts by typing part1 part2 ... partN at the Type to search > prompt.

Options

  • --showerrors

Instead of exiting silently when a word is not found, display a message for ~1 second.

  • --font "Font"

Specify font to use in menu. Font name must be double-quoted. Format: FontName (Weight (optional) FontSize). Example: --font "Monaco Bold 10" or Monaco 10

  • --plainrofi

Read Rofi settings from ~/.Xresources (see Rofi documentation) or default.

Custom words

Simply add them to a ~/.Custom_Words.txt file. The Extra_Words.txt file included already has a few jargon, abbreviations and words (total 1653 by default) not included in the EOWL.

You can also define expansions, in ~/.Custom_Words.txt. An entry for an expansion in the ~/.Custom_Words.txt looks like:

short=really_long_text_you_want_to_type

and will show up as short=really_lon... in the menu and when selected, will type really_long_text_you_want_to_type.

Command outputs

Simply type #command --options, for example #date -u.

Combining command outputs and expansions

Simply do:

short_cmd=#long_command and --options

About

Simple Linux utility to autocomplete words in the GUI

License:GNU General Public License v3.0


Languages

Language:Python 100.0%