tuberry / light-dict

Lightweight extension for on-the-fly manipulation to primary selections, especially optimized for Dictionary lookups.
GNU General Public License v3.0
34 stars 1 forks source link

Light Dict

Lightweight extension for on-the-fly manipulation to primary selections, especially optimized for Dictionary lookups.

L, you know what? The Shinigami only eats apples. —— Light Yagami\ license

ld

Installation

Manual

The latest and supported version should only work on the most current stable version of GNOME Shell.

git clone https://github.com/tuberry/light-dict.git && cd light-dict
meson setup build && meson install -C build
# meson setup build -Dtarget=system && meson install -C build # system-wide, default --prefix=/usr/local

For older versions, it's recommended to install via:

E.G.O

Get it on GNOME Extensions

Features

DBus

For the DBus usage, see _ldocr.fish as a sample reference.

Methods

gdbus introspect --session --dest org.gnome.Shell --object-path /org/gnome/Shell/Extensions/LightDict

Arguments

OCR
Run

OCR

Dependencies

ldpref

Screencast

https://user-images.githubusercontent.com/17917040/137623193-9a21117b-733e-4e1b-95d2-ac32f865af26.mp4

Command

Bash

Scripts run within bash -c:

JS

Scripts run within scoped JS eval() to provide DE related functions:

And some native JS functions like LDWORD.toUpperCase().

Notes

Contributions

Feel free to open an issue or PR in the repo for any question or idea.

Translations

To update the po file from sources:

bash ./cli/update-po.sh [your_lang_code] # like zh_CN, default to $LANG

Developments

To install GJS TypeScript type definitions:

npm install @girs/gnome-shell --save-dev

Acknowledgements