dicx is a simple tool that provides the meaning of any selected word and pronounces the word if possible.
It utilizes the xclip tool to retrieve the selected word from the active window and fetches the meaning using the free dictionary API (dictionaryapi.dev). Finally, it presents the output using the notify-send program to send notifications.
The following tools are necessary for the program to work properly:
- libnotify
- xclip
- go compiler
NOTE: Install at your own RISK!!
Before building from source, make sure you meet all the requirements.
- Build the source using
go build dicx.go
or usego install github.com/vikySeeker/dicx@latest
. - Move the executable
dicx
to your desired path for global access. - Create a shortcut in your system binding the command
dicx
with the shortcut, and you are good to go!
Alternatively, you can select any word in the window and run the program directly.
This program can output results in three modes:
- Terminal Mode: Simply outputs to the terminal.
- Notification Mode: When the program is invoked via a keyboard shortcut, it uses this mode.
- Hybrid Mode: Combining both modes. Use the
-n
flag to force the program to send output in both ways, but only in terminal mode.
If the go install spits an error stating that alsa.pc path is missing or anything regarding alsa, try isntalling libasound2-dev library and try again.