From 8c38ebe553106ded6bceb24c3ccee5dac66334b7 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 2 Jun 2023 16:41:24 -0400 Subject: [PATCH] update setup instructions --- README.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7662efd..5733696 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ # suckless_dictpopup -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. +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. ![image](https://files.catbox.moe/dx3hf5.png) ## Dependencies -most of them might be already installed. +notice that most of them might be already installed, they are: sselp , sdcv, perl - +### Currently tested on: +- Gnu/Linux +- FreeBSD ## Setup @@ -17,12 +19,22 @@ First setup [sdcv](https://github.com/Dushistov/sdcv) according to their github Then install with `sudo make install`. \ Uninstall with `sudo make uninstall` -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 +If you would like to automatically lookup a word on every selection (recommended) , then take a look at the following script:
https://github.com/KonstantinDjairo/suckless_dictpopup/blob/main/daemon-popup
+
+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. + ## Usage -Call `dictpopup []`.\ -If no word as an argument is supplied, the selection is used.\ -The popup can be dismissed by clicking on it. +Bind to a shortcut \ +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. + +Here is a snippet from my ~/.config/i3/config showing how to bind `dictpopup` to a keyboard shortcut. \ +```console +# Run dictpopup +bindsym $mod+c exec --no-startup-id dictpopup +``` The styling can be changed in `config.h` and then recompile to apply. There is also a xresources patch from [herbe](https://github.com/dudik/herbe)