kumakichi / Deepl-linux-electron

DeepL(https://www.deepl.com/) Integration for Linux. Select text in any application and simply press Ctrl+C and another shortcut to translate it.
MIT License
102 stars 13 forks source link

** 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

+begin_quote

~/.config/Deepl-Linux-Electron/user_theme.css

+end_quote

a simple dark mode implementation, thanks to [[https://userstyles.world/user/NotJ3st3r][NotJ3st3r]]:

+begin_src css

html {
  filter: invert(90%) hue-rotate(180deg) brightness(110%) contrast(110%);
  background: white;
}

+end_src

** install yarn

+BEGIN_SRC sh

 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

+END_SRC

** install dependencies

+BEGIN_SRC sh

 yarn

+END_SRC

** build or debug

+BEGIN_SRC sh

 # for dev
 yarn dev

 # for build
 yarn dist:dir # generated file : dist/linux-unpacked/deepl-linux-electron

+END_SRC

** build in docker

+BEGIN_SRC sh

 # 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

+END_SRC

** 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.