wezterm: hack to work like it used to in tmux
This commit is contained in:
parent
8dc4873606
commit
8a9f86c1db
2 changed files with 39 additions and 13 deletions
|
@ -1,11 +1,26 @@
|
||||||
local wezterm = require 'wezterm';
|
local wezterm = require 'wezterm';
|
||||||
|
|
||||||
|
local editPanes = {};
|
||||||
|
local editMarker = ":nvim";
|
||||||
|
|
||||||
|
-- Window titles are a perfectly fine IPC mechanism 😁
|
||||||
|
|
||||||
|
wezterm.on("update-right-status", function(window, pane)
|
||||||
|
local title = pane:get_title();
|
||||||
|
local pid = pane:pane_id();
|
||||||
|
if editPanes[pid] ~= title and title:sub(-#editMarker) == editMarker then
|
||||||
|
editPanes[pid] = title;
|
||||||
|
window:perform_action(wezterm.action{ActivateTab=0}, pane);
|
||||||
|
end
|
||||||
|
end);
|
||||||
|
|
||||||
function font_with_fallback(name, params)
|
function font_with_fallback(name, params)
|
||||||
local names = {name, "Noto Color Emoji"}
|
local names = {name, "Noto Color Emoji"}
|
||||||
return wezterm.font_with_fallback(names, params)
|
return wezterm.font_with_fallback(names, params)
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
-- automatically_reload_config = false,
|
||||||
|
|
||||||
font = font_with_fallback("Iosevka Term SS09 Light"),
|
font = font_with_fallback("Iosevka Term SS09 Light"),
|
||||||
font_rules = {
|
font_rules = {
|
||||||
|
@ -47,22 +62,33 @@ return {
|
||||||
enable_scroll_bar = false,
|
enable_scroll_bar = false,
|
||||||
window_decorations = "NONE",
|
window_decorations = "NONE",
|
||||||
scrollback_lines = 5000,
|
scrollback_lines = 5000,
|
||||||
|
alternate_buffer_wheel_scroll_speed = 2,
|
||||||
check_for_updates = false,
|
check_for_updates = false,
|
||||||
|
status_update_interval = 100,
|
||||||
|
|
||||||
|
leader = { key="o", mods="CTRL", timeout_milliseconds=1000 },
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
{key="C", mods="ALT|SHIFT", action="Copy"},
|
|
||||||
{key="V", mods="ALT|SHIFT", action="Paste"},
|
|
||||||
|
|
||||||
-- {key="1", mods="ALT", action=wezterm.action{ActivateTab=0}},
|
{key="c", mods="ALT|SHIFT", action="Copy"},
|
||||||
-- {key="2", mods="ALT", action=wezterm.action{ActivateTab=1}},
|
{key="v", mods="ALT|SHIFT", action="Paste"},
|
||||||
-- {key="3", mods="ALT", action=wezterm.action{ActivateTab=2}},
|
{key="n", mods="LEADER", action=wezterm.action{SpawnTab="CurrentPaneDomain"}},
|
||||||
-- {key="4", mods="ALT", action=wezterm.action{ActivateTab=3}},
|
{key="c", mods="LEADER", action=wezterm.action{SpawnTab="CurrentPaneDomain"}},
|
||||||
-- {key="5", mods="ALT", action=wezterm.action{ActivateTab=4}},
|
{key="k", mods="LEADER", action=wezterm.action{CloseCurrentTab={confirm=true}}},
|
||||||
-- {key="6", mods="ALT", action=wezterm.action{ActivateTab=5}},
|
|
||||||
-- {key="7", mods="ALT", action=wezterm.action{ActivateTab=6}},
|
{key="LeftArrow", mods="CTRL", action=wezterm.action{ActivateTabRelative=-1}},
|
||||||
-- {key="8", mods="ALT", action=wezterm.action{ActivateTab=7}},
|
{key="RightArrow", mods="CTRL", action=wezterm.action{ActivateTabRelative=1}},
|
||||||
-- {key="9", mods="ALT", action=wezterm.action{ActivateTab=8}},
|
|
||||||
-- {key="0", mods="ALT", action=wezterm.action{ActivateTab=9}},
|
{key="1", mods="ALT", action=wezterm.action{ActivateTab=0}},
|
||||||
|
{key="2", mods="ALT", action=wezterm.action{ActivateTab=1}},
|
||||||
|
{key="3", mods="ALT", action=wezterm.action{ActivateTab=2}},
|
||||||
|
{key="4", mods="ALT", action=wezterm.action{ActivateTab=3}},
|
||||||
|
{key="5", mods="ALT", action=wezterm.action{ActivateTab=4}},
|
||||||
|
{key="6", mods="ALT", action=wezterm.action{ActivateTab=5}},
|
||||||
|
{key="7", mods="ALT", action=wezterm.action{ActivateTab=6}},
|
||||||
|
{key="8", mods="ALT", action=wezterm.action{ActivateTab=7}},
|
||||||
|
{key="9", mods="ALT", action=wezterm.action{ActivateTab=8}},
|
||||||
|
{key="0", mods="ALT", action=wezterm.action{ActivateTab=9}},
|
||||||
},
|
},
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
|
|
2
.zshrc
2
.zshrc
|
@ -130,8 +130,8 @@ export NVIM_LISTEN_ADDRESS=/tmp/nvimsocket
|
||||||
|
|
||||||
e ()
|
e ()
|
||||||
{
|
{
|
||||||
tmux select-window -t1
|
|
||||||
nvr --remote $(readlink -f "$@")
|
nvr --remote $(readlink -f "$@")
|
||||||
|
echo -e "\x1b]2;$(date +%s):nvim\x1b\\"
|
||||||
}
|
}
|
||||||
|
|
||||||
## fzf
|
## fzf
|
||||||
|
|
Loading…
Reference in a new issue