2023-05-09 10:51:38 +00:00
# dictpopup
2023-05-09 10:42:03 +00:00
2023-05-09 10:57:36 +00:00
This is a very lightweight program to show a popup with the translation of the selected text. It uses [sdcv ](https://github.com/Dushistov/sdcv ) for the dictionary lookup and a slightly modified version of [herbe ](https://github.com/dudik/herbe ) to display the popup.
2023-05-09 10:42:03 +00:00
2023-05-09 10:54:46 +00:00
![image ](https://github.com/GenjiFujimoto/dictpopup/assets/50422430/c4a3663b-fd91-4a66-95ad-f1528071c932 )
2023-05-28 11:21:34 +00:00
![screenshot-2023-05-28-08-34-19 ](https://github.com/GenjiFujimoto/dictpopup/assets/50422430/179ad9f9-b4fa-4731-92c6-105ced37c353 )
2023-05-09 10:51:38 +00:00
## Dependencies
2023-05-28 11:21:34 +00:00
sselp (can be replaced with xclip -o), sdcv. \
Optional: lynx (for html support)
2023-05-09 10:42:03 +00:00
2023-05-09 10:51:38 +00:00
## Setup
2023-05-09 11:42:55 +00:00
First setup [sdcv ](https://github.com/Dushistov/sdcv ) according to their github page.
2023-05-28 11:15:50 +00:00
Then install with `sudo make install` . \
Uninstall with `sudo make uninstall`
2023-05-09 10:42:03 +00:00
2023-05-28 11:43:20 +00:00
If you would like to automatically lookup a word on every selection, then take a look at the following script: https://github.com/GenjiFujimoto/shell-scripts/blob/main/selautolookup
2023-05-09 10:42:03 +00:00
## Usage
2023-05-28 11:15:50 +00:00
Call `dictpopup [html] [<WORD>]` .\
If no word as an argument is supplied, the selection is used.\
If the string `html` is supplied as the first argument, then html support will be enabled.\
The popup can be dismissed by clicking on it.
The styling can be changed in `config.h` and then recompile to apply.
2023-05-09 10:57:06 +00:00
There is also a xresources patch from [herbe ](https://github.com/dudik/herbe )
2023-05-28 11:15:50 +00:00
that you could try to apply if you like.
2023-05-09 11:42:55 +00:00
2023-05-28 11:15:50 +00:00
`popup` can also be used as a standalone program to show the contents of stdin.