Banner
Icon

TEx

keyboard abbreviations application text expander in python

descktoppython

simple text expander ( keyboard abbreviation application) using python.

Demo:

Features:

  • Ability to create categories
  • keyring encrypted categories ( can be used for passwords for example )
  • toggle individual item or even entire app expansion
  • tray icon with statistics, buffer view, expansion toggle & etc..
image

Code:

clone the project

run:

1git clone https://github.com/gravadox/TEx.git

install dependencies:

1pip install customtkinter pystray pynput cryptography keyring psutil notify-py

then run:

1python main.py

pay attention to the tray when you close the app.

the expanding functionality is totaly achieved by the pynput library

check: text_expander.py file

TEx/
└── Expander/
└── text_expander.py

the app comes with 7 default abbreviations, tagged emoji, you can find it in the abbreviations.json file:

jsonabbreviations.json
1{
2"--wink": {
3"replacement": "😉",
4"ignored": false,
5"tag": "emoji"
6},
7
8"--laugh": {
9"replacement": "😂",
10"ignored": false,
11"tag": "emoji"
12
13},
14
15"--sunglasses": {
16"replacement": "😎",
17"ignored": false,
18"tag": "emoji"
19
20},
21
22"--cry": {
23"replacement": "😢",
24"ignored": false,
25"tag": "emoji"
26},
27
28"--heart": {
29"replacement": "❤️",
30"ignored": false,
31"tag": "emoji"
32},
33
34"--thumbs_up": {
35"replacement": "👍",
36"ignored": false,
37"tag": "emoji"
38},
39
40"--middle_finger": {
41"replacement": "🖕",
42"ignored": false,
43"tag": "emoji"
44}
45}

you have the freedom to create categoires and delete them.

you can also create an encrypted category by checking the checkbox for encryption.

you can store passwords and secret data in it although caution is required.

all data stored in an encrypted category is decrypted using keyring token, if that token is lost your data can not be retrieved.

I advice you keep a copy of data you don't want to lose just in case.

I recommend you don't change the app files unless you know what you're doing.

better CLI based version is planned to be developed

note this app is tested on windows and linux on wayland

feedback is appreciated