About A client for [[https://www.deepl.com/translator][deepl]] in Linux, using [[https://www.electronjs.org/][Electron]].
Tested under ubuntu 20.04 only.
[[./demo.png]]
How to use
** get binary Clone this repo and build it, or just simply download the prebuilt binary from [[https://github.com/kumakichi/Deepl-linux-electron/releases][Release Page]]
* use it Open deepl-linux-electron, select text in any application, press Ctrl+c to copy selected content into clipboard, then use shortcut Control+Alt+D* to translate
** set shortcut You can change this shortcut on the program menu: Settings -> Shortcut
** user-defined css Support user-defined css, just put your css code into
~/.config/Deepl-Linux-Electron/user_theme.css
a simple dark mode implementation, thanks to [[https://userstyles.world/user/NotJ3st3r][NotJ3st3r]]:
html {
filter: invert(90%) hue-rotate(180deg) brightness(110%) contrast(110%);
background: white;
}
** install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
** install dependencies
yarn
** build or debug
# for dev
yarn dev
# for build
yarn dist:dir # generated file : dist/linux-unpacked/deepl-linux-electron
** build in docker
# run docker in repo dir
docker run -it --rm --name deepl-linux -v $(pwd):/app -w /app --entrypoint /bin/bash node:18
# build
yarn install
yarn dist
** run on linux
Deepl may not start with the error FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.
If you encounter this, try running deepl --in-process-gpu
.