mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-17 08:10:22 -07:00
docs: add keymap.yaml example
This commit is contained in:
parent
42ffdca542
commit
29ff1e627b
12
README.md
12
README.md
@ -78,7 +78,7 @@ git clone https://github.com/eeeXun/gtt.git && cd gtt && go build -ldflags="-s -
|
||||
docker run -it eeexun/gtt:latest
|
||||
```
|
||||
|
||||
## Create a theme
|
||||
## 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`.
|
||||
|
||||
@ -112,6 +112,8 @@ See available languages on:
|
||||
|
||||
## Key Map
|
||||
|
||||
### Default key map
|
||||
|
||||
`<C-c>`
|
||||
Exit program.
|
||||
|
||||
@ -157,6 +159,14 @@ Cycle through the pop out widget.
|
||||
`<1>`, `<2>`, `<3>`
|
||||
Switch pop out window.
|
||||
|
||||
### Customize key map
|
||||
|
||||
See the example in [keymap.yaml](example/keymap.yaml) file. This file should located at `$XDG_CONFIG_HOME/gtt/keymap.yaml` or `$HOME/.config/gtt/keymap.yaml`
|
||||
|
||||
For key to combine with `Ctrl`, value can be `" "` (Space), `"\\"` or `'\'` (backslash), `"]"`, `"^"`, `"_"`, `"a"` to `"z"` (lower case).
|
||||
|
||||
⚠️ Note, don't use `"c"`, `<C-c>` is for exit program
|
||||
|
||||
## Credit
|
||||
|
||||
[soimort/translate-shell](https://github.com/soimort/translate-shell),
|
||||
|
27
example/keymap.yaml
Normal file
27
example/keymap.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
# This file should located at $XDG_CONFIG_HOME/gtt/keymap.yaml or $HOME/.config/gtt/keymap.yaml
|
||||
# For key to combine with Ctrl, value can be " " (Space), "\\" or '\' (backslash), "]", "^", "_", "a" to "z" (lower case)
|
||||
# ⚠️ Note, don't use "c", <C-c> is for exit program
|
||||
# Or the function key, value can be "F1" to "F64"
|
||||
|
||||
# Translate, <C-j>
|
||||
translate: "j"
|
||||
# Swap language, <C-s>
|
||||
swap_language: "s"
|
||||
# Clear all text in source of translation window, <C-q>
|
||||
clear: "q"
|
||||
# Copy selected text, <C-y>
|
||||
copy_selected: "y"
|
||||
# Copy all text in source of translation window, <C-g>
|
||||
copy_src: "g"
|
||||
# Copy all text in destination of translation window, <C-r>
|
||||
copy_dst: "r"
|
||||
# Play text to speech on source of translation window, <C-o>
|
||||
tts_src: "o"
|
||||
# Play text to speech on destination of translation window, <C-p>
|
||||
tts_dst: "p"
|
||||
# Stop playing text to speech, <C-x>
|
||||
stop_tts: "x"
|
||||
# Toggle transparent, <C-t>
|
||||
toggle_transparent: "t"
|
||||
# Toggle Definition/Example & Part of speech, <C-\>
|
||||
toggle_below: "\\"
|
Loading…
x
Reference in New Issue
Block a user