suckless_dictpopup/README.md

60 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

2023-06-02 15:20:36 +00:00
# suckless_dictpopup
2023-05-09 10:42:03 +00:00
2023-12-19 14:59:00 +00:00
This is a very lightweight program to show a popup with the dictionary entry of the selected text. It uses Xlib for displaying the popup and [sdcv](https://github.com/Dushistov/sdcv) for the dictionary lookup.
2024-02-05 14:18:08 +00:00
<br></br>
2024-02-05 14:22:02 +00:00
#### DISCLAIMER:
That program is intended to be used for reading monolingual dictionaries in *goldendict-ng* , it can serve others purposes, but the main goal is that you don't need to wait years until you complete your monolingual transition.
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
2024-02-18 20:25:16 +00:00
## Installation
### in Guix
2024-05-04 14:52:21 +00:00
- suckless_dictpopup is available as a package in our [repository](http://localhost:3000/hashirama/ajattix)
2024-02-18 20:25:16 +00:00
### in non-guix systems
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