2020-10-10 18:40:14 +03:00
|
|
|
# MoveTab
|
|
|
|
|
|
|
|
Move the tab so that it has the index specified by the argument. eg: `0`
|
|
|
|
moves the tab to be leftmost, while `1` moves the tab so that it is second tab
|
|
|
|
from the left, and so on.
|
|
|
|
|
|
|
|
```lua
|
2022-06-25 16:58:10 +03:00
|
|
|
local wezterm = require 'wezterm'
|
2020-10-10 18:40:14 +03:00
|
|
|
|
|
|
|
local mykeys = {}
|
|
|
|
for i = 1, 8 do
|
|
|
|
-- CTRL+ALT + number to move to that position
|
|
|
|
table.insert(mykeys, {
|
2022-07-19 17:54:31 +03:00
|
|
|
key = tostring(i),
|
|
|
|
mods = 'CTRL|ALT',
|
|
|
|
action = wezterm.action.MoveTab(i - 1),
|
2020-10-10 18:40:14 +03:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
keys = mykeys,
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|