Skip to content

Commit

Permalink
循环监听时间修改为150毫秒
Browse files Browse the repository at this point in the history
  • Loading branch information
cnbattle committed Apr 21, 2020
1 parent 9b65298 commit 8e04333
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
./aitranslate -once // 只运行翻译一次,完成后退出
```

## Tips
> manjaro 可以开启`clipman`设置中的 `同步鼠标选择区`,实现选中自动翻译
## 依赖 `xsel``xclip`

```
Expand Down
2 changes: 1 addition & 1 deletion aitranslate.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func main() {
text = getClipboardString()
if !once {
for {
time.Sleep(time.Millisecond * 50)
time.Sleep(time.Millisecond * 150)
newText := getClipboardString()
if !whatlang.IsEnglish(newText) {
continue
Expand Down

0 comments on commit 8e04333

Please sign in to comment.