Skip to content

Commit

Permalink
feat: use wezterm pane and keymaps instead of tmux
Browse files Browse the repository at this point in the history
  • Loading branch information
ebkn committed Jul 19, 2024
1 parent ba5bdb7 commit 45fe135
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# start tmux
export PATH="/opt/homebrew/bin:$PATH" # to recognize tmux
[[ -z "$TMUX" ]] && tmux -u
# export PATH="/opt/homebrew/bin:$PATH" # to recognize tmux
# [[ -z "$TMUX" ]] && tmux -u

ENABLE_CORRECTION="true"

Expand Down
28 changes: 27 additions & 1 deletion wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,33 @@ return {
audible_bell = "Disabled",

-- https://github.com/wez/wezterm/issues/2630
leader = { key = 'q', mods = 'CTRL', timeout_milliseconds = 1000 },

keys = {
{ mods = "CTRL", key = "q", action=wezterm.action{ SendString="\x11" } },
}
-- 分割
{ mods = "LEADER", key = "v", action = wezterm.action { SplitHorizontal = { domain = "CurrentPaneDomain" } }, },
{ mods = "LEADER", key = "s", action = wezterm.action { SplitVertical = { domain = "CurrentPaneDomain" } }, },
{ mods = "LEADER", key = "w", action = wezterm.action.CloseCurrentPane { confirm = true } },
-- 移動
{ mods = "LEADER", key = 'h', action = wezterm.action.ActivatePaneDirection 'Left' },
{ mods = "LEADER", key = 'j', action = wezterm.action.ActivatePaneDirection 'Down' },
{ mods = "LEADER", key = 'k', action = wezterm.action.ActivatePaneDirection 'Up' },
{ mods = "LEADER", key = 'l', action = wezterm.action.ActivatePaneDirection 'Right' },
-- リサイズ
{ mods = "LEADER|SHIFT", key = 'h', action = wezterm.action.AdjustPaneSize { 'Left', 5 } },
{ mods = "LEADER|SHIFT", key = 'j', action = wezterm.action.AdjustPaneSize { 'Down', 5 } },
{ mods = "LEADER|SHIFT", key = 'k', action = wezterm.action.AdjustPaneSize { 'Up', 5 } },
{ mods = "LEADER|SHIFT", key = 'l', action = wezterm.action.AdjustPaneSize { 'Right', 5 } },
-- コピーモード
{ mods = "LEADER", key = 'u', action = wezterm.action.ActivateCopyMode },
},

mouse_bindings = {
{
event = { Down = { streak = 1, button = 'Right' } },
mods = 'NONE',
action = wezterm.action.PasteFrom 'Clipboard',
},
},
}

0 comments on commit 45fe135

Please sign in to comment.