Skip to content

Instantly share code, notes, and snippets.

@tamago324
Last active March 15, 2026 14:43
Show Gist options
  • Select an option

  • Save tamago324/46d8704a52afc2b70746bfff4addce20 to your computer and use it in GitHub Desktop.

Select an option

Save tamago324/46d8704a52afc2b70746bfff4addce20 to your computer and use it in GitHub Desktop.
wezterm の設定
local wezterm = require('wezterm')
local config = wezterm.config_builder()
local act = wezterm.action
config.font = wezterm.font('Cica')
config.font_size = 13.0
config.color_scheme = 'Tokyo Night'
config.scrollback_lines = 10000
config.window_background_opacity = 0.80
config.front_end = "WebGpu"
-- タブは必要な時だけ表示する
config.enable_tab_bar = true
-- config.hide_tab_bar_if_only_one_tab = true
-- タイトルバーを薄くする
-- window_decorations = "RESIZE"
config.default_prog = { "wsl.exe", "~" }
-- 初期サイズを調整
config.initial_cols = 140
config.initial_rows = 36
-- 周りの隙間を無くす
config.window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
}
-- config.window_decorations = "RESIZE"
-- タブバーの+を消す
config.show_new_tab_button_in_tab_bar = false
-- -- タブがーを透明にする
-- config.use_fancy_tab_bar = false
-- config.colors = {
-- tab_bar = {
-- background = "none",
-- },
-- }
-- config.window_background_gradient = {
-- colors = { "#000000" },
-- }
config.tab_bar_at_bottom = true
-------------------------
-- keymap
-------------------------
config.leader = { key='g', mods='CTRL', timeout_milliseconds = 500 }
config.keys = {
-- 新しいタブを開く (Ctrl+Shift+T)
{
key = "t",
mods = "CTRL|SHIFT",
action = act.SpawnTab "CurrentPaneDomain"
},
-- 縦分割 (Ctrl+Shift+V)
{
key = 'v',
mods = "CTRL|SHIFT",
action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }
},
-- 横分割 (Ctrl+Shift+S)
{
key = 's',
mods = "CTRL|SHIFT",
action = act.SplitVertical { domain = 'CurrentPaneDomain' }
},
-- コピーモードは、デフォルトで Ctrl+Shift+X
{
-- ペースト
key = "p",
mods = "LEADER",
action = act.PasteFrom("Clipboard"),
},
-- パネルの最大化
{
key = "Enter",
mods = "LEADER",
action = act.TogglePaneZoomState,
},
-- パネルの入れ替え
{
key = "s",
mods = "LEADER",
action = act.PaneSelect {
mode = "SwapWithActive",
},
},
}
-- smart-splits で、Neovim の buffer と WezTerm のパネルの行き来を同じキーバインドで行えるようにする
local smart_splits = wezterm.plugin.require('https://github.com/mrjones2014/smart-splits.nvim')
smart_splits.apply_to_config(config, {
direction_keys = {
move = { 'h', 'j', 'k', 'l' },
resize = { 'LeftArrow', 'DownArrow', 'UpArrow', 'RightArrow' },
},
modifiers = {
move = 'META',
resize = 'META'
}
})
return config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment