v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-21 10:00:59 -07:00

docs: move key map section before theme section

This commit is contained in:
eeeXun 2023-06-30 19:59:50 +08:00
parent d01ef4e768
commit d5fcc90037

View File

@ -78,43 +78,8 @@ git clone https://github.com/eeeXun/gtt.git && cd gtt && go build -ldflags="-s -
docker run -it eeexun/gtt:latest docker run -it eeexun/gtt:latest
``` ```
## Customize theme
You can create a theme with theme name. And you must provide the color of `bg`, `fg`, `gray`, `red`, `green`, `yellow`, `blue`, `purple`, `cyan`, `orange`.
And note that:
- `bg` is for background color
- `fg` is for foreground color
- `gray` is for selected color
- `yellow` is for label color
- `orange` is for KeyMap menu color
- `purple` is for button pressed color
See the example in [theme.yaml](example/theme.yaml) file. This file should be located at `$XDG_CONFIG_HOME/gtt/theme.yaml` or `$HOME/.config/gtt/theme.yaml`.
## Language in argument
You can pass `-src` and `-dst` in argument to set source and destination language.
```sh
gtt -src "English" -dst "Chinese (Traditional)"
```
See available languages on:
- [Apertium Translate](https://www.apertium.org/) for `Apertium`
- [argosopentech/argos-translate](https://github.com/argosopentech/argos-translate#supported-languages) for `Argos`
- [Bing language-support](https://learn.microsoft.com/en-us/azure/cognitive-services/translator/language-support#translation) for `Bing`
- `ChatGPT` is same as `Google`. See [Google Language support](https://cloud.google.com/translate/docs/languages)
- [DeepL API docs](https://www.deepl.com/docs-api/translate-text/) for `DeepL`
- [Google Language support](https://cloud.google.com/translate/docs/languages) for `Google`
- [Reverso Translation](https://www.reverso.net/text-translation) for `Reverso`
## Key Map ## Key Map
### Default key map
`<C-c>` `<C-c>`
Exit program. Exit program.
@ -185,6 +150,39 @@ Or you can use function key, the value can be `"F1"` to `"F64"`.
See the example in [keymap.yaml](example/keymap.yaml) file. This file should be located at `$XDG_CONFIG_HOME/gtt/keymap.yaml` or `$HOME/.config/gtt/keymap.yaml`. See the example in [keymap.yaml](example/keymap.yaml) file. This file should be located at `$XDG_CONFIG_HOME/gtt/keymap.yaml` or `$HOME/.config/gtt/keymap.yaml`.
## Customize theme
You can create a theme with theme name. And you must provide the color of `bg`, `fg`, `gray`, `red`, `green`, `yellow`, `blue`, `purple`, `cyan`, `orange`.
And note that:
- `bg` is for background color
- `fg` is for foreground color
- `gray` is for selected color
- `yellow` is for label color
- `orange` is for KeyMap menu color
- `purple` is for button pressed color
See the example in [theme.yaml](example/theme.yaml) file. This file should be located at `$XDG_CONFIG_HOME/gtt/theme.yaml` or `$HOME/.config/gtt/theme.yaml`.
## Language in argument
You can pass `-src` and `-dst` in argument to set source and destination language.
```sh
gtt -src "English" -dst "Chinese (Traditional)"
```
See available languages on:
- [Apertium Translate](https://www.apertium.org/) for `Apertium`
- [argosopentech/argos-translate](https://github.com/argosopentech/argos-translate#supported-languages) for `Argos`
- [Bing language-support](https://learn.microsoft.com/en-us/azure/cognitive-services/translator/language-support#translation) for `Bing`
- `ChatGPT` is same as `Google`. See [Google Language support](https://cloud.google.com/translate/docs/languages)
- [DeepL API docs](https://www.deepl.com/docs-api/translate-text/) for `DeepL`
- [Google Language support](https://cloud.google.com/translate/docs/languages) for `Google`
- [Reverso Translation](https://www.reverso.net/text-translation) for `Reverso`
## Credit ## Credit
[soimort/translate-shell](https://github.com/soimort/translate-shell), [soimort/translate-shell](https://github.com/soimort/translate-shell),