mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-16 15:50:52 -07:00
docs: note for OSC 52
This commit is contained in:
parent
028b0c0620
commit
f43f589ed2
@ -64,6 +64,8 @@ For RedHat-based Linux, you need `alsa-lib-devel`.
|
|||||||
|
|
||||||
[`wl-clipboard`](https://github.com/bugaevc/wl-clipboard) (optional) - for Linux/Wayland to copy text.
|
[`wl-clipboard`](https://github.com/bugaevc/wl-clipboard) (optional) - for Linux/Wayland to copy text.
|
||||||
|
|
||||||
|
Or, if your terminal supports OSC 52, you can enable OSC 52 in page 2 of the pop out menu to copy text.
|
||||||
|
|
||||||
### Arch Linux ([AUR](https://aur.archlinux.org/packages/gtt-bin))
|
### Arch Linux ([AUR](https://aur.archlinux.org/packages/gtt-bin))
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -120,7 +122,7 @@ docker run -it eeexun/gtt:latest
|
|||||||
Exit program.
|
Exit program.
|
||||||
|
|
||||||
`<Esc>`
|
`<Esc>`
|
||||||
Toggle pop out window.
|
Toggle pop out menu.
|
||||||
|
|
||||||
`<C-j>`
|
`<C-j>`
|
||||||
Translate from source to destination window.
|
Translate from source to destination window.
|
||||||
@ -159,7 +161,7 @@ Toggle Definition/Example & Part of speech.
|
|||||||
Cycle through the pop out widget.
|
Cycle through the pop out widget.
|
||||||
|
|
||||||
`<1>`, `<2>`, `<3>`
|
`<1>`, `<2>`, `<3>`
|
||||||
Switch pop out window.
|
Switch pop out menu.
|
||||||
|
|
||||||
### Customize key map
|
### Customize key map
|
||||||
|
|
||||||
|
12
ui.go
12
ui.go
@ -18,12 +18,12 @@ type Item struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
popOutWindowHeight int = 20
|
popOutMenuHeight int = 20
|
||||||
langStrMaxLength int = 32
|
langStrMaxLength int = 32
|
||||||
keyMapText string = `[#%[1]s]<C-c>[-]
|
keyMapText string = `[#%[1]s]<C-c>[-]
|
||||||
Exit program.
|
Exit program.
|
||||||
[#%[1]s]<Esc>[-]
|
[#%[1]s]<Esc>[-]
|
||||||
Toggle pop out window.
|
Toggle pop out menu.
|
||||||
[#%[1]s]<%[2]s>[-]
|
[#%[1]s]<%[2]s>[-]
|
||||||
Translate from source to destination window.
|
Translate from source to destination window.
|
||||||
[#%[1]s]<%[3]s>[-]
|
[#%[1]s]<%[3]s>[-]
|
||||||
@ -49,7 +49,7 @@ const (
|
|||||||
[#%[1]s]<Tab>, <S-Tab>[-]
|
[#%[1]s]<Tab>, <S-Tab>[-]
|
||||||
Cycle through the pop out widget.
|
Cycle through the pop out widget.
|
||||||
[#%[1]s]<1>, <2>, <3>[-]
|
[#%[1]s]<1>, <2>, <3>[-]
|
||||||
Switch pop out window.`
|
Switch pop out menu.`
|
||||||
)
|
)
|
||||||
|
|
||||||
func updateTranslateWindow() {
|
func updateTranslateWindow() {
|
||||||
@ -347,7 +347,7 @@ func uiInit() {
|
|||||||
Item{item: dstLangDropDown, fixedSize: 0, proportion: 1, focus: false}),
|
Item{item: dstLangDropDown, fixedSize: 0, proportion: 1, focus: false}),
|
||||||
fixedSize: 0, proportion: 1, focus: true}),
|
fixedSize: 0, proportion: 1, focus: true}),
|
||||||
fixedSize: 2 * langStrMaxLength, proportion: 1, focus: true}),
|
fixedSize: 2 * langStrMaxLength, proportion: 1, focus: true}),
|
||||||
popOutWindowHeight, 1, true).
|
popOutMenuHeight, 1, true).
|
||||||
AddItem(attachButton(), 1, 1, false).
|
AddItem(attachButton(), 1, 1, false).
|
||||||
AddItem(nil, 0, 1, false)
|
AddItem(nil, 0, 1, false)
|
||||||
stylePopOut.SetDirection(tview.FlexRow).
|
stylePopOut.SetDirection(tview.FlexRow).
|
||||||
@ -367,14 +367,14 @@ func uiInit() {
|
|||||||
Item{item: dstBorderDropDown, fixedSize: 0, proportion: 1, focus: false}),
|
Item{item: dstBorderDropDown, fixedSize: 0, proportion: 1, focus: false}),
|
||||||
fixedSize: 0, proportion: 1, focus: false}),
|
fixedSize: 0, proportion: 1, focus: false}),
|
||||||
fixedSize: 2 * langStrMaxLength, proportion: 1, focus: true}),
|
fixedSize: 2 * langStrMaxLength, proportion: 1, focus: true}),
|
||||||
popOutWindowHeight, 1, true).
|
popOutMenuHeight, 1, true).
|
||||||
AddItem(attachButton(), 1, 1, false).
|
AddItem(attachButton(), 1, 1, false).
|
||||||
AddItem(nil, 0, 1, false)
|
AddItem(nil, 0, 1, false)
|
||||||
keyMapPopOut.SetDirection(tview.FlexRow).
|
keyMapPopOut.SetDirection(tview.FlexRow).
|
||||||
AddItem(nil, 0, 1, false).
|
AddItem(nil, 0, 1, false).
|
||||||
AddItem(attachItems(true, tview.FlexColumn,
|
AddItem(attachItems(true, tview.FlexColumn,
|
||||||
Item{item: keyMapMenu, fixedSize: 2 * langStrMaxLength, proportion: 1, focus: true}),
|
Item{item: keyMapMenu, fixedSize: 2 * langStrMaxLength, proportion: 1, focus: true}),
|
||||||
popOutWindowHeight, 1, true).
|
popOutMenuHeight, 1, true).
|
||||||
AddItem(attachButton(), 1, 1, false).
|
AddItem(attachButton(), 1, 1, false).
|
||||||
AddItem(nil, 0, 1, false)
|
AddItem(nil, 0, 1, false)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user