Skip to content

a very lightweight popup dictionary written in C

License

Notifications You must be signed in to change notification settings

KonstantinDjairo/suckless_dictpopup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

suckless_dictpopup

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 for the dictionary lookup.

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.

image

Dependencies

notice that most of them might be already installed, they are:

sselp , sdcv, perl

Currently tested on:

  • GNU/Linux
  • FreeBSD

Installation

in Guix

  • suckless_dictpopup is available as a package in our repository



in non-guix systems

First setup sdcv according to their github page. Then install with sudo make install.
Uninstall with sudo make uninstall

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

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 someone's ~/.config/i3/config showing how to bind dictpopup to a keyboard shortcut.

# 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 that you could try to apply if you like.

popup can also be used as a standalone program to show the contents of stdin.

TODO

  • Completed
  • Work in Progress

  • Switch between words in a given sentence by using the arrow keys or any user-defined key; Sudachi can be used to accomplish that.
  • Clipboard watch toggle

About

a very lightweight popup dictionary written in C

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 77.8%
  • Makefile 17.9%
  • Shell 4.3%