mirror of https://github.com/harish2704/dotFiles
2 changed files with 18 additions and 5 deletions
@ -0,0 +1,18 @@ |
|||||
|
#!/usr/bin/env zx
|
||||
|
|
||||
|
|
||||
|
let engineList = await $`ibus read-config | grep preload-engines | sed "s/preload-engines://g; s/'/\\"/g"` |
||||
|
|
||||
|
engineList = JSON.parse(engineList) |
||||
|
|
||||
|
let currentEngine = await $`ibus engine` |
||||
|
currentEngine = currentEngine.toString().trim() |
||||
|
|
||||
|
let currentEngineIdx = engineList.indexOf(currentEngine); |
||||
|
|
||||
|
let nextEngineIdx = currentEngineIdx+1; |
||||
|
if( nextEngineIdx === engineList.length ){ |
||||
|
nextEngineIdx=0 |
||||
|
} |
||||
|
|
||||
|
await $`ibus engine ${engineList[nextEngineIdx]}` |
@ -1,5 +0,0 @@ |
|||||
|
|
||||
addSsh(){ |
|
||||
mkdir -p ~/.ssh && read rsa && echo "$rsa" >> ~/.ssh/authorized_keys |
|
||||
} |
|
||||
|
|
Loading…
Reference in new issue