suckless_dictpopup/README.md

53 lines
1.9 KiB
Markdown
Raw Normal View History

2023-06-02 15:20:36 +00:00
# suckless_dictpopup
2023-05-09 10:42:03 +00:00
2023-06-02 20:41:24 +00:00
This is a very lightweight program to show a popup with the dictionary entry of the selected text. It uses [sdcv](https://github.com/Dushistov/sdcv) for the dictionary lookup and optionally, a slightly modified version of [herbe](https://github.com/dudik/herbe) to display the popup.
2023-05-09 10:42:03 +00:00
2023-08-01 21:18:26 +00:00
![image](misc/showcase.png)
2023-05-09 10:54:46 +00:00
2023-05-09 10:51:38 +00:00
## Dependencies
2023-06-02 20:41:24 +00:00
notice that most of them might be already installed, they are:
2023-05-30 02:40:01 +00:00
2023-05-30 03:38:29 +00:00
sselp , sdcv, perl
2023-05-30 02:40:01 +00:00
2023-06-02 20:41:24 +00:00
### Currently tested on:
- GNU/Linux
2023-06-02 20:41:24 +00:00
- FreeBSD
2023-05-30 02:28:24 +00:00
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-06-02 20:41:24 +00:00
If you would like to automatically lookup a word on every selection (recommended) , then take a look at the following script: <br> https://github.com/KonstantinDjairo/suckless_dictpopup/blob/main/daemon-popup <br>
<br>
This is not meant to be running all the time, since it looks up everything that goes into the clipboard.\
Disable when using mpvacious for example.
2023-05-28 11:43:20 +00:00
2023-06-02 20:42:39 +00:00
## Usage <br>
Bind to a shortcut <br> \
2023-06-02 20:41:24 +00:00
To add a keyboard shortcut, you can use options of your WM or DE. You can also use sxhkd. \
The popup can be dismissed by clicking on it.
2023-06-02 20:47:33 +00:00
Here is a snippet from someone's ~/.config/i3/config showing how to bind `dictpopup` to a keyboard shortcut.
2023-06-02 20:41:24 +00:00
```console
# Run dictpopup
bindsym $mod+c exec --no-startup-id dictpopup
```
2023-05-28 11:15:50 +00:00
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.
## TODO
2023-06-02 15:47:44 +00:00
- [x] Completed
- [ ] Work in Progress
<br><br/>
2023-06-02 15:23:19 +00:00
- [ ] Switch between words in a given sentence by using the arrow keys or any user-defined key;
Sudachi can be used to accomplish that.
2023-08-03 02:15:37 +00:00
- [ ] Clipboard watch toggle