diff --git a/chezmoi.roots/_home.macos/private_dot_config/wezterm/wezterm.lua.tmpl b/chezmoi.roots/_home.macos/private_dot_config/wezterm/wezterm.lua.tmpl index 7cc311d..a70f560 120000 --- a/chezmoi.roots/_home.macos/private_dot_config/wezterm/wezterm.lua.tmpl +++ b/chezmoi.roots/_home.macos/private_dot_config/wezterm/wezterm.lua.tmpl @@ -1 +1 @@ -../../../_src.all/private_dot_config/wezterm/wezterm.lua \ No newline at end of file +../../../_src.posix/private_dot_config/wezterm/wezterm.lua.tmpl \ No newline at end of file diff --git a/chezmoi.roots/_home/private_dot_config/wezterm/wezterm.lua b/chezmoi.roots/_home/private_dot_config/wezterm/wezterm.lua deleted file mode 120000 index 7cc311d..0000000 --- a/chezmoi.roots/_home/private_dot_config/wezterm/wezterm.lua +++ /dev/null @@ -1 +0,0 @@ -../../../_src.all/private_dot_config/wezterm/wezterm.lua \ No newline at end of file diff --git a/chezmoi.roots/_home/private_dot_config/wezterm/wezterm.lua.tmpl b/chezmoi.roots/_home/private_dot_config/wezterm/wezterm.lua.tmpl new file mode 120000 index 0000000..a70f560 --- /dev/null +++ b/chezmoi.roots/_home/private_dot_config/wezterm/wezterm.lua.tmpl @@ -0,0 +1 @@ +../../../_src.posix/private_dot_config/wezterm/wezterm.lua.tmpl \ No newline at end of file diff --git a/chezmoi.roots/_src.all/private_dot_config/wezterm/wezterm.lua b/chezmoi.roots/_src.all/private_dot_config/wezterm/wezterm.lua deleted file mode 100644 index d68e0ac..0000000 --- a/chezmoi.roots/_src.all/private_dot_config/wezterm/wezterm.lua +++ /dev/null @@ -1,260 +0,0 @@ --- Pull in the wezterm API -local wezterm = require("wezterm") -local act = wezterm.action - --- This table will hold the configuration. -local config = {} - --- In newer versions of wezterm, use the config_builder which will --- help provide clearer error messages -if wezterm.config_builder then - config = wezterm.config_builder() -end - -config.hide_tab_bar_if_only_one_tab = true -config.window_background_opacity = 0.9 -config.text_background_opacity = 0.9 - --- This is where you actually apply your config choices -config.audible_bell = "Disabled" - -config.visual_bell = { - fade_in_function = "EaseIn", - fade_in_duration_ms = 50, - fade_out_function = "Constant", - fade_out_duration_ms = 0, -} --- config.colors = { --- visual_bell = '#202020', --- } - --- For example, changing the color scheme: --- config.color_scheme = 'AdventureTime' --- config.color_scheme = 'Batman' --- config.color_scheme = 'Apple System Colors' --- config.color_scheme = 'Azu (Gogh)' --- config.color_scheme = 'Bim (Gogh)' --- config.colorCMD_scheme = 'Cai (Gogh)' --- config.color_scheme = 'CGA' --- config.color_scheme = 'Chalkboard' --- config.color_scheme = 'Dark Pastel' --- config.color_scheme = 'Dark Violet (base16)' --- config.color_scheme = 'Default Dark (base16)' --- config.color_scheme = 'Dotshare (terminal.sexy)' --- config.color_scheme = 'Dracula' --- config.color_scheme = 'Dracula (Official)' --- config.color_scheme = 'Dracula+' --- config.color_scheme = 'duckbones' --- config.color_scheme = 'Floraverse' -- ***** --- config.color_scheme = 'Galizur' --- config.color_scheme = 'Github Dark (Gogh)' --- config.color_scheme = 'Glacier' --- config.color_scheme = 'Gnometerm (terminal.sexy)' --- config.color_scheme = 'Gotham (Gogh)' --- config.color_scheme = 'Grayscale Dark (base16)' --- config.color_scheme = 'Hardcore (Gogh)' --- config.color_scheme = 'Highway' --- config.color_scheme = 'Hybrid (terminal.sexy)' --- config.color_scheme = 'Ibm3270 (Gogh)' --- config.color_scheme = 'Iiamblack (terminal.sexy)' --- config.color_scheme = 'iTerm2 Default' --- config.color_scheme = 'iTerm2 Smoooooth' --- config.color_scheme = 'iTerm2 Tango Dark' --- config.color_scheme = 'Jason Wryan (terminal.sexy)' --- config.color_scheme = 'Kibble' --- config.color_scheme = 'Kibble (Gogh)' --- config.color_scheme = 'Konsolas' --- config.color_scheme = 'LiquidCarbonTransparent' --- config.color_scheme = 'MaterialDark' --- config.color_scheme = 'MaterialDesignColors' --- config.color_scheme = 'Muse (terminal.sexy)' --- config.color_scheme = 'niji' --- config.color_scheme = 'Oceanic Next (Gogh)' --- config.color_scheme = 'Pasque (base16)' -- Purple/Lavendar hues -config.color_scheme = "Pencil Dark (Gogh)" -- ****1/2 --- config.color_scheme = 'PencilDark' --- config.color_scheme = 'Popping and Locking' --- config.color_scheme = 'Rasi (terminal.sexy)' --- config.color_scheme = 'Rezza (terminal.sexy)' --- config.color_scheme = 'Rosé Pine (Gogh)' --- config.color_scheme = 'Rouge 2' --- config.color_scheme = 'Royal' -- ****1/2 --- config.color_scheme = 'Sea Shells (Gogh)' --- config.color_scheme = 'Seti' --- config.color_scheme = 'shades-of-purple' --- config.color_scheme = 'SpaceGray Eighties' --- config.color_scheme = 'Tango (terminal.sexy)' --- config.color_scheme = 'Twilight (dark) (terminal.sexy)' --- config.color_scheme = 'VibrantInk' --- config.color_scheme = 'Vice Alt (base16)' --- config.color_scheme = 'Vice Dark (base16)' - --- config.font = wezterm.font 'CaskaydiaCove Nerd Font Mono Regular' -config.font = wezterm.font_with_fallback({ - "FiraCode Nerd Font Mono", - "FiraCode Nerd Font Mono SemBd", - "FiraCode Nerd Font Mono Ret", - "FiraMono Nerd Font Mono", - "DroidSansM Nerd Font", - "DroidSansMono NF", - "DroidSansMono", - "Consolas", - "Courier New", - "monospace", -}) - --- config.disable_default_key_bindings = true - ---config.default_prog = { 'pwsh' } - -config.keys = { - { - key = "T", - mods = "CTRL|SHIFT", - action = wezterm.action.ShowLauncher, - }, - { - key = "T", - mods = "SUPER", - action = wezterm.action.ShowLauncher, - }, -} --- { --- key = ',', --- mods = 'CMD', --- action = act.SpawnCommandInNewTab { --- cwd = os.getenv('WEZTERM_CONFIG_DIR'), --- set_environment_variables = { --- TERM = 'screen-256color', --- }, --- args = { --- 'code', --- os.getenv('WEZTERM_CONFIG_FILE'), --- }, --- }, --- }, --- { --- key = 'R', --- mods = 'CMD|SHIFT', --- action = act.PromptInputLine { --- description = 'Enter new name for tab', --- action = wezterm.action_callback(function(window, _, line) --- -- line will be `nil` if they hit escape without entering anything --- -- An empty string if they just hit enter --- -- Or the actual line of text they wrote --- if line then --- window:active_tab():set_title(line) --- end --- end), --- }, --- }, --- -- other keys --- -- { --- -- key = "n", --- -- mods = "CTRL", --- -- action = wezterm.action.SpawnCommandInNewTab({ --- -- args = {"code ."} --- -- }) --- -- }, --- } - -config.window_background_gradient = { - -- Can be "Vertical" or "Horizontal". Specifies the direction - -- in which the color gradient varies. The default is "Horizontal", - -- with the gradient going from left-to-right. - -- Linear and Radial gradients are also supported; see the other - -- examples below - orientation = "Vertical", - - -- Specifies the set of colors that are interpolated in the gradient. - -- Accepts CSS style color specs, from named colors, through rgb - -- strings and more - colors = { - "#0f0c29", - "#302b63", - "#24243e", - }, - - -- Instead of specifying `colors`, you can use one of a number of - -- predefined, preset gradients. - -- A list of presets is shown in a section below. - -- preset = "Warm", - - -- Specifies the interpolation style to be used. - -- "Linear", "Basis" and "CatmullRom" as supported. - -- The default is "Linear". - interpolation = "Linear", - - -- How the colors are blended in the gradient. - -- "Rgb", "LinearRgb", "Hsv" and "Oklab" are supported. - -- The default is "Rgb". - blend = "Rgb", - - -- To avoid vertical color banding for horizontal gradients, the - -- gradient position is randomly shifted by up to the `noise` value - -- for each pixel. - -- Smaller values, or 0, will make bands more prominent. - -- The default value is 64 which gives decent looking results - -- on a retina macbook pro display. - -- noise = 64, - - -- By default, the gradient smoothly transitions between the colors. - -- You can adjust the sharpness by specifying the segment_size and - -- segment_smoothness parameters. - -- segment_size configures how many segments are present. - -- segment_smoothness is how hard the edge is; 0.0 is a hard edge, - -- 1.0 is a soft edge. - - -- segment_size = 11, - -- segment_smoothness = 0.0, -} -config.window_background_gradient = null -config.prefer_to_spawn_tabs = true - -wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width) - local pane_title = tab.active_pane.title - local user_title = tab.active_pane.user_vars.panetitle - - if user_title ~= nil and #user_title > 0 then - pane_title = user_title - end - - return { - -- {Background={Color="blue"}}, - -- {Foreground={Color="white"}}, - { Text = " " .. pane_title .. " " }, - } -end) - --- # First and only argument is the desired term title --- function rename_wezterm_title { printf "\x1b]1337;SetUserVar=panetitle=%s\x07" "$(echo -n "$*" | base64)"; }; rename_wezterm_title Serial:$(hostname) - --- wezterm.on("merge_all_windows", function(window, pane) --- local workspace = wezterm.mux.get_active_workspace() --- local all_windows = wezterm.mux.all_windows() - --- -- Find the first window in the workspace to move all tabs into --- local target_window = nil --- for _, win in ipairs(all_windows) do --- if win:get_workspace() == workspace then --- target_window = win --- break --- end --- end - --- if not target_window then return end - --- -- Move all tabs from other windows into target_window --- for _, win in ipairs(all_windows) do --- if win ~= target_window and win:get_workspace() == workspace then --- for _, tab in ipairs(win:tabs()) do --- tab:move_to_window(target_window) --- end --- -- Close the now empty window --- win:perform_action(wezterm.action.CloseCurrentPane { confirm = false }, win:active_pane()) --- end --- end --- end) - --- and finally, return the configuration to wezterm -return config diff --git a/chezmoi.roots/_src.all/private_dot_config/wezterm/wezterm.lua.tmpl b/chezmoi.roots/_src.all/private_dot_config/wezterm/wezterm.lua.tmpl new file mode 100644 index 0000000..52e7435 --- /dev/null +++ b/chezmoi.roots/_src.all/private_dot_config/wezterm/wezterm.lua.tmpl @@ -0,0 +1,469 @@ +-- Pull in the wezterm API +local wezterm = require("wezterm") +local act = wezterm.action + +-- This table will hold the configuration. +local config = {} + +-- In newer versions of wezterm, use the config_builder which will +-- help provide clearer error messages +if wezterm.config_builder then + config = wezterm.config_builder() +end + +{{- if eq .chezmoi.os "Windows" }} +config.default_prog = { 'pwsh' } +{{- end }} + +config.hide_tab_bar_if_only_one_tab = true +config.window_background_opacity = 0.9 +config.text_background_opacity = 0.9 + +-- This is where you actually apply your config choices +config.audible_bell = "Disabled" + +config.visual_bell = { + fade_in_function = "EaseIn", + fade_in_duration_ms = 50, + fade_out_function = "Constant", + fade_out_duration_ms = 0, +} +-- config.colors = { +-- visual_bell = '#202020', +-- } + +-- For example, changing the color scheme: +-- config.color_scheme = 'AdventureTime' +-- config.color_scheme = 'Batman' +-- config.color_scheme = 'Apple System Colors' +-- config.color_scheme = 'Azu (Gogh)' +-- config.color_scheme = 'Bim (Gogh)' +-- config.colorCMD_scheme = 'Cai (Gogh)' +-- config.color_scheme = 'CGA' +-- config.color_scheme = 'Chalkboard' +-- config.color_scheme = 'Dark Pastel' +-- config.color_scheme = 'Dark Violet (base16)' +-- config.color_scheme = 'Default Dark (base16)' +-- config.color_scheme = 'Dotshare (terminal.sexy)' +-- config.color_scheme = 'Dracula' +-- config.color_scheme = 'Dracula (Official)' +-- config.color_scheme = 'Dracula+' +-- config.color_scheme = 'duckbones' +-- config.color_scheme = 'Floraverse' -- ***** +-- config.color_scheme = 'Galizur' +-- config.color_scheme = 'Github Dark (Gogh)' +-- config.color_scheme = 'Glacier' +-- config.color_scheme = 'Gnometerm (terminal.sexy)' +-- config.color_scheme = 'Gotham (Gogh)' +-- config.color_scheme = 'Grayscale Dark (base16)' +-- config.color_scheme = 'Hardcore (Gogh)' +-- config.color_scheme = 'Highway' +-- config.color_scheme = 'Hybrid (terminal.sexy)' +-- config.color_scheme = 'Ibm3270 (Gogh)' +-- config.color_scheme = 'Iiamblack (terminal.sexy)' +-- config.color_scheme = 'iTerm2 Default' +-- config.color_scheme = 'iTerm2 Smoooooth' +-- config.color_scheme = 'iTerm2 Tango Dark' +-- config.color_scheme = 'Jason Wryan (terminal.sexy)' +-- config.color_scheme = 'Kibble' +-- config.color_scheme = 'Kibble (Gogh)' +-- config.color_scheme = 'Konsolas' +-- config.color_scheme = 'LiquidCarbonTransparent' +-- config.color_scheme = 'MaterialDark' +-- config.color_scheme = 'MaterialDesignColors' +-- config.color_scheme = 'Muse (terminal.sexy)' +-- config.color_scheme = 'niji' +-- config.color_scheme = 'Oceanic Next (Gogh)' +-- config.color_scheme = 'Pasque (base16)' -- Purple/Lavendar hues +config.color_scheme = "Pencil Dark (Gogh)" -- ****1/2 +-- config.color_scheme = 'PencilDark' +-- config.color_scheme = 'Popping and Locking' +-- config.color_scheme = 'Rasi (terminal.sexy)' +-- config.color_scheme = 'Rezza (terminal.sexy)' +-- config.color_scheme = 'Rosé Pine (Gogh)' +-- config.color_scheme = 'Rouge 2' +-- config.color_scheme = 'Royal' -- ****1/2 +-- config.color_scheme = 'Sea Shells (Gogh)' +-- config.color_scheme = 'Seti' +-- config.color_scheme = 'shades-of-purple' +-- config.color_scheme = 'SpaceGray Eighties' +-- config.color_scheme = 'Tango (terminal.sexy)' +-- config.color_scheme = 'Twilight (dark) (terminal.sexy)' +-- config.color_scheme = 'VibrantInk' +-- config.color_scheme = 'Vice Alt (base16)' +-- config.color_scheme = 'Vice Dark (base16)' + +-- config.font = wezterm.font 'CaskaydiaCove Nerd Font Mono Regular' +config.font = wezterm.font_with_fallback({ + "FiraCode Nerd Font Mono", + "FiraCode Nerd Font Mono SemBd", + "FiraCode Nerd Font Mono Ret", + "FiraMono Nerd Font Mono", + "DroidSansM Nerd Font", + "DroidSansMono NF", + "DroidSansMono", + "Consolas", + "Courier New", + "monospace", +}) + +config.window_background_gradient = { + -- Can be "Vertical" or "Horizontal". Specifies the direction + -- in which the color gradient varies. The default is "Horizontal", + -- with the gradient going from left-to-right. + -- Linear and Radial gradients are also supported; see the other + -- examples below + orientation = "Vertical", + + -- Specifies the set of colors that are interpolated in the gradient. + -- Accepts CSS style color specs, from named colors, through rgb + -- strings and more + colors = { + "#0f0c29", + "#302b63", + "#24243e", + }, + + -- Instead of specifying `colors`, you can use one of a number of + -- predefined, preset gradients. + -- A list of presets is shown in a section below. + -- preset = "Warm", + + -- Specifies the interpolation style to be used. + -- "Linear", "Basis" and "CatmullRom" as supported. + -- The default is "Linear". + interpolation = "Linear", + + -- How the colors are blended in the gradient. + -- "Rgb", "LinearRgb", "Hsv" and "Oklab" are supported. + -- The default is "Rgb". + blend = "Rgb", + + -- To avoid vertical color banding for horizontal gradients, the + -- gradient position is randomly shifted by up to the `noise` value + -- for each pixel. + -- Smaller values, or 0, will make bands more prominent. + -- The default value is 64 which gives decent looking results + -- on a retina macbook pro display. + -- noise = 64, + + -- By default, the gradient smoothly transitions between the colors. + -- You can adjust the sharpness by specifying the segment_size and + -- segment_smoothness parameters. + -- segment_size configures how many segments are present. + -- segment_smoothness is how hard the edge is; 0.0 is a hard edge, + -- 1.0 is a soft edge. + + -- segment_size = 11, + -- segment_smoothness = 0.0, +} +config.window_background_gradient = null +config.prefer_to_spawn_tabs = true + +wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width) + local pane_title = tab.active_pane.title + local user_title = tab.active_pane.user_vars.panetitle + + if user_title ~= nil and #user_title > 0 then + pane_title = user_title + end + + return { + -- {Background={Color="blue"}}, + -- {Foreground={Color="white"}}, + { Text = " " .. pane_title .. " " }, + } +end) + +-- # First and only argument is the desired term title +-- function rename_wezterm_title { printf "\x1b]1337;SetUserVar=panetitle=%s\x07" "$(echo -n "$*" | base64)"; }; rename_wezterm_title Serial:$(hostname) + +-- wezterm.on("merge_all_windows", function(window, pane) +-- local workspace = wezterm.mux.get_active_workspace() +-- local all_windows = wezterm.mux.all_windows() + +-- -- Find the first window in the workspace to move all tabs into +-- local target_window = nil +-- for _, win in ipairs(all_windows) do +-- if win:get_workspace() == workspace then +-- target_window = win +-- break +-- end +-- end + +-- if not target_window then return end + +-- -- Move all tabs from other windows into target_window +-- for _, win in ipairs(all_windows) do +-- if win ~= target_window and win:get_workspace() == workspace then +-- for _, tab in ipairs(win:tabs()) do +-- tab:move_to_window(target_window) +-- end +-- -- Close the now empty window +-- win:perform_action(wezterm.action.CloseCurrentPane { confirm = false }, win:active_pane()) +-- end +-- end +-- end) + +config.disable_default_key_bindings = true + +config.keys = { +-- { key = 'Tab', mods = 'CTRL', action = act.ActivateTabRelative(1) }, +-- { key = 'Tab', mods = 'SHIFT|CTRL', action = act.ActivateTabRelative(-1) }, +-- { key = 'Enter', mods = 'ALT', action = act.ToggleFullScreen }, +-- { key = '!', mods = 'CTRL', action = act.ActivateTab(0) }, +-- { key = '!', mods = 'SHIFT|CTRL', action = act.ActivateTab(0) }, +-- { key = '\"', mods = 'ALT|CTRL', action = act.SplitVertical{ domain = 'CurrentPaneDomain' } }, +-- { key = '\"', mods = 'SHIFT|ALT|CTRL', action = act.SplitVertical{ domain = 'CurrentPaneDomain' } }, +-- { key = '#', mods = 'CTRL', action = act.ActivateTab(2) }, +-- { key = '#', mods = 'SHIFT|CTRL', action = act.ActivateTab(2) }, +-- { key = '$', mods = 'CTRL', action = act.ActivateTab(3) }, +-- { key = '$', mods = 'SHIFT|CTRL', action = act.ActivateTab(3) }, +-- { key = '%', mods = 'CTRL', action = act.ActivateTab(4) }, +-- { key = '%', mods = 'SHIFT|CTRL', action = act.ActivateTab(4) }, +-- { key = '%', mods = 'ALT|CTRL', action = act.SplitHorizontal{ domain = 'CurrentPaneDomain' } }, +-- { key = '%', mods = 'SHIFT|ALT|CTRL', action = act.SplitHorizontal{ domain = 'CurrentPaneDomain' } }, +-- { key = '&', mods = 'CTRL', action = act.ActivateTab(6) }, +-- { key = '&', mods = 'SHIFT|CTRL', action = act.ActivateTab(6) }, +-- { key = '\'', mods = 'SHIFT|ALT|CTRL', action = act.SplitVertical{ domain = 'CurrentPaneDomain' } }, +-- { key = '(', mods = 'CTRL', action = act.ActivateTab(-1) }, +-- { key = '(', mods = 'SHIFT|CTRL', action = act.ActivateTab(-1) }, +-- { key = ')', mods = 'CTRL', action = act.ResetFontSize }, +-- { key = ')', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, +-- { key = '*', mods = 'CTRL', action = act.ActivateTab(7) }, +-- { key = '*', mods = 'SHIFT|CTRL', action = act.ActivateTab(7) }, +-- { key = '+', mods = 'CTRL', action = act.IncreaseFontSize }, +-- { key = '+', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, +-- { key = '-', mods = 'CTRL', action = act.DecreaseFontSize }, +-- { key = '-', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, +-- { key = '-', mods = 'SUPER', action = act.DecreaseFontSize }, +-- { key = '0', mods = 'CTRL', action = act.ResetFontSize }, +-- { key = '0', mods = 'SHIFT|CTRL', action = act.ResetFontSize }, +-- { key = '0', mods = 'SUPER', action = act.ResetFontSize }, +-- { key = '1', mods = 'SHIFT|CTRL', action = act.ActivateTab(0) }, +-- { key = '1', mods = 'SUPER', action = act.ActivateTab(0) }, +-- { key = '2', mods = 'SHIFT|CTRL', action = act.ActivateTab(1) }, +-- { key = '2', mods = 'SUPER', action = act.ActivateTab(1) }, +-- { key = '3', mods = 'SHIFT|CTRL', action = act.ActivateTab(2) }, +-- { key = '3', mods = 'SUPER', action = act.ActivateTab(2) }, +-- { key = '4', mods = 'SHIFT|CTRL', action = act.ActivateTab(3) }, +-- { key = '4', mods = 'SUPER', action = act.ActivateTab(3) }, +-- { key = '5', mods = 'SHIFT|CTRL', action = act.ActivateTab(4) }, +-- { key = '5', mods = 'SHIFT|ALT|CTRL', action = act.SplitHorizontal{ domain = 'CurrentPaneDomain' } }, +-- { key = '5', mods = 'SUPER', action = act.ActivateTab(4) }, +-- { key = '6', mods = 'SHIFT|CTRL', action = act.ActivateTab(5) }, +-- { key = '6', mods = 'SUPER', action = act.ActivateTab(5) }, +-- { key = '7', mods = 'SHIFT|CTRL', action = act.ActivateTab(6) }, +-- { key = '7', mods = 'SUPER', action = act.ActivateTab(6) }, +-- { key = '8', mods = 'SHIFT|CTRL', action = act.ActivateTab(7) }, +-- { key = '8', mods = 'SUPER', action = act.ActivateTab(7) }, +-- { key = '9', mods = 'SHIFT|CTRL', action = act.ActivateTab(-1) }, +-- { key = '9', mods = 'SUPER', action = act.ActivateTab(-1) }, +-- { key = '=', mods = 'CTRL', action = act.IncreaseFontSize }, +-- { key = '=', mods = 'SHIFT|CTRL', action = act.IncreaseFontSize }, +-- { key = '=', mods = 'SUPER', action = act.IncreaseFontSize }, +-- { key = '@', mods = 'CTRL', action = act.ActivateTab(1) }, +-- { key = '@', mods = 'SHIFT|CTRL', action = act.ActivateTab(1) }, +-- { key = 'C', mods = 'CTRL', action = act.CopyTo 'Clipboard' }, +-- { key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, +-- { key = 'F', mods = 'CTRL', action = act.Search 'CurrentSelectionOrEmptyString' }, +-- { key = 'F', mods = 'SHIFT|CTRL', action = act.Search 'CurrentSelectionOrEmptyString' }, +-- { key = 'H', mods = 'CTRL', action = act.HideApplication }, +-- { key = 'H', mods = 'SHIFT|CTRL', action = act.HideApplication }, +-- { key = 'K', mods = 'CTRL', action = act.ClearScrollback 'ScrollbackOnly' }, +-- { key = 'K', mods = 'SHIFT|CTRL', action = act.ClearScrollback 'ScrollbackOnly' }, +-- { key = 'L', mods = 'CTRL', action = act.ShowDebugOverlay }, +-- { key = 'L', mods = 'SHIFT|CTRL', action = act.ShowDebugOverlay }, +-- { key = 'M', mods = 'CTRL', action = act.Hide }, +-- { key = 'M', mods = 'SHIFT|CTRL', action = act.Hide }, +-- { key = 'N', mods = 'CTRL', action = act.SpawnWindow }, +-- { key = 'N', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, + { key = 'P', mods = 'CTRL', action = act.ActivateCommandPalette }, + { key = 'P', mods = 'SHIFT|CTRL', action = act.ActivateCommandPalette }, +-- { key = 'Q', mods = 'CTRL', action = act.QuitApplication }, +-- { key = 'Q', mods = 'SHIFT|CTRL', action = act.QuitApplication }, +-- { key = 'R', mods = 'CTRL', action = act.ReloadConfiguration }, +-- { key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, + { key = 'T', mods = 'CTRL', action = act.ShowLauncher }, + { key = 't', mods = 'CTRL', action = act.ShowLauncher }, + { key = 't', mods = 'SUPER', action = act.ShowLauncher }, + { key = 'T', mods = 'SUPER', action = act.ShowLauncher }, +-- { key = 'U', mods = 'CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, +-- { key = 'U', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, +-- { key = 'V', mods = 'CTRL', action = act.PasteFrom 'Clipboard' }, +-- { key = 'V', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, +-- { key = 'W', mods = 'CTRL', action = act.CloseCurrentTab{ confirm = true } }, +-- { key = 'W', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = true } }, +-- { key = 'X', mods = 'CTRL', action = act.ActivateCopyMode }, +-- { key = 'X', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, +-- { key = 'Z', mods = 'CTRL', action = act.TogglePaneZoomState }, +-- { key = 'Z', mods = 'SHIFT|CTRL', action = act.TogglePaneZoomState }, +-- { key = '[', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(-1) }, +-- { key = ']', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(1) }, +-- { key = '^', mods = 'CTRL', action = act.ActivateTab(5) }, +-- { key = '^', mods = 'SHIFT|CTRL', action = act.ActivateTab(5) }, +-- { key = '_', mods = 'CTRL', action = act.DecreaseFontSize }, +-- { key = '_', mods = 'SHIFT|CTRL', action = act.DecreaseFontSize }, +-- { key = 'c', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' }, +-- { key = 'c', mods = 'SUPER', action = act.CopyTo 'Clipboard' }, +-- { key = 'f', mods = 'SHIFT|CTRL', action = act.Search 'CurrentSelectionOrEmptyString' }, +-- { key = 'f', mods = 'SUPER', action = act.Search 'CurrentSelectionOrEmptyString' }, +-- { key = 'h', mods = 'SHIFT|CTRL', action = act.HideApplication }, +-- { key = 'h', mods = 'SUPER', action = act.HideApplication }, +-- { key = 'k', mods = 'SHIFT|CTRL', action = act.ClearScrollback 'ScrollbackOnly' }, +-- { key = 'k', mods = 'SUPER', action = act.ClearScrollback 'ScrollbackOnly' }, +-- { key = 'l', mods = 'SHIFT|CTRL', action = act.ShowDebugOverlay }, +-- { key = 'm', mods = 'SHIFT|CTRL', action = act.Hide }, +-- { key = 'm', mods = 'SUPER', action = act.Hide }, +-- { key = 'n', mods = 'SHIFT|CTRL', action = act.SpawnWindow }, +-- { key = 'n', mods = 'SUPER', action = act.SpawnWindow }, + { key = 'p', mods = 'SHIFT|CTRL', action = act.ActivateCommandPalette }, +-- { key = 'q', mods = 'SHIFT|CTRL', action = act.QuitApplication }, +-- { key = 'q', mods = 'SUPER', action = act.QuitApplication }, +-- { key = 'r', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration }, +-- { key = 'r', mods = 'SUPER', action = act.ReloadConfiguration }, +-- { key = 't', mods = 'SUPER', action = act.SpawnTab 'CurrentPaneDomain' }, +-- { key = 'u', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } }, +-- { key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' }, +-- { key = 'v', mods = 'SUPER', action = act.PasteFrom 'Clipboard' }, +-- { key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = true } }, +-- { key = 'w', mods = 'SUPER', action = act.CloseCurrentTab{ confirm = true } }, +-- { key = 'x', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode }, +-- { key = 'z', mods = 'SHIFT|CTRL', action = act.TogglePaneZoomState }, +-- { key = '{', mods = 'SUPER', action = act.ActivateTabRelative(-1) }, +-- { key = '{', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(-1) }, +-- { key = '}', mods = 'SUPER', action = act.ActivateTabRelative(1) }, +-- { key = '}', mods = 'SHIFT|SUPER', action = act.ActivateTabRelative(1) }, +-- { key = 'phys:Space', mods = 'SHIFT|CTRL', action = act.QuickSelect }, +-- { key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-1) }, +-- { key = 'PageUp', mods = 'CTRL', action = act.ActivateTabRelative(-1) }, +-- { key = 'PageUp', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(-1) }, +-- { key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(1) }, +-- { key = 'PageDown', mods = 'CTRL', action = act.ActivateTabRelative(1) }, +-- { key = 'PageDown', mods = 'SHIFT|CTRL', action = act.MoveTabRelative(1) }, +-- { key = 'LeftArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Left' }, +-- { key = 'LeftArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Left', 1 } }, +-- { key = 'RightArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Right' }, +-- { key = 'RightArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Right', 1 } }, +-- { key = 'UpArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Up' }, +-- { key = 'UpArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Up', 1 } }, +-- { key = 'DownArrow', mods = 'SHIFT|CTRL', action = act.ActivatePaneDirection 'Down' }, +-- { key = 'DownArrow', mods = 'SHIFT|ALT|CTRL', action = act.AdjustPaneSize{ 'Down', 1 } }, + { key = 'Copy', mods = 'NONE', action = act.CopyTo 'Clipboard' }, + { key = 'Paste', mods = 'NONE', action = act.PasteFrom 'Clipboard' }, + } + +config.key_tables = { + copy_mode = { + { key = 'Tab', mods = 'NONE', action = act.CopyMode 'MoveForwardWord' }, + { key = 'Tab', mods = 'SHIFT', action = act.CopyMode 'MoveBackwardWord' }, + { key = 'Enter', mods = 'NONE', action = act.CopyMode 'MoveToStartOfNextLine' }, + { key = 'Escape', mods = 'NONE', action = act.CopyMode 'Close' }, + { key = 'Space', mods = 'NONE', action = act.CopyMode{ SetSelectionMode = 'Cell' } }, + { key = '$', mods = 'NONE', action = act.CopyMode 'MoveToEndOfLineContent' }, + { key = '$', mods = 'SHIFT', action = act.CopyMode 'MoveToEndOfLineContent' }, + { key = ',', mods = 'NONE', action = act.CopyMode 'JumpReverse' }, + { key = '0', mods = 'NONE', action = act.CopyMode 'MoveToStartOfLine' }, + { key = ';', mods = 'NONE', action = act.CopyMode 'JumpAgain' }, + { key = 'F', mods = 'NONE', action = act.CopyMode{ JumpBackward = { prev_char = false } } }, + { key = 'F', mods = 'SHIFT', action = act.CopyMode{ JumpBackward = { prev_char = false } } }, + { key = 'G', mods = 'NONE', action = act.CopyMode 'MoveToScrollbackBottom' }, + { key = 'G', mods = 'SHIFT', action = act.CopyMode 'MoveToScrollbackBottom' }, + { key = 'H', mods = 'NONE', action = act.CopyMode 'MoveToViewportTop' }, + { key = 'H', mods = 'SHIFT', action = act.CopyMode 'MoveToViewportTop' }, + { key = 'L', mods = 'NONE', action = act.CopyMode 'MoveToViewportBottom' }, + { key = 'L', mods = 'SHIFT', action = act.CopyMode 'MoveToViewportBottom' }, + { key = 'M', mods = 'NONE', action = act.CopyMode 'MoveToViewportMiddle' }, + { key = 'M', mods = 'SHIFT', action = act.CopyMode 'MoveToViewportMiddle' }, + { key = 'O', mods = 'NONE', action = act.CopyMode 'MoveToSelectionOtherEndHoriz' }, + { key = 'O', mods = 'SHIFT', action = act.CopyMode 'MoveToSelectionOtherEndHoriz' }, + { key = 'T', mods = 'NONE', action = act.CopyMode{ JumpBackward = { prev_char = true } } }, + { key = 'T', mods = 'SHIFT', action = act.CopyMode{ JumpBackward = { prev_char = true } } }, + { key = 'V', mods = 'NONE', action = act.CopyMode{ SetSelectionMode = 'Line' } }, + { key = 'V', mods = 'SHIFT', action = act.CopyMode{ SetSelectionMode = 'Line' } }, + { key = '^', mods = 'NONE', action = act.CopyMode 'MoveToStartOfLineContent' }, + { key = '^', mods = 'SHIFT', action = act.CopyMode 'MoveToStartOfLineContent' }, + { key = 'b', mods = 'NONE', action = act.CopyMode 'MoveBackwardWord' }, + { key = 'b', mods = 'ALT', action = act.CopyMode 'MoveBackwardWord' }, + { key = 'b', mods = 'CTRL', action = act.CopyMode 'PageUp' }, + { key = 'c', mods = 'CTRL', action = act.CopyMode 'Close' }, + { key = 'd', mods = 'CTRL', action = act.CopyMode{ MoveByPage = (0.5) } }, + { key = 'e', mods = 'NONE', action = act.CopyMode 'MoveForwardWordEnd' }, + { key = 'f', mods = 'NONE', action = act.CopyMode{ JumpForward = { prev_char = false } } }, + { key = 'f', mods = 'ALT', action = act.CopyMode 'MoveForwardWord' }, + { key = 'f', mods = 'CTRL', action = act.CopyMode 'PageDown' }, + { key = 'g', mods = 'NONE', action = act.CopyMode 'MoveToScrollbackTop' }, + { key = 'g', mods = 'CTRL', action = act.CopyMode 'Close' }, + { key = 'h', mods = 'NONE', action = act.CopyMode 'MoveLeft' }, + { key = 'j', mods = 'NONE', action = act.CopyMode 'MoveDown' }, + { key = 'k', mods = 'NONE', action = act.CopyMode 'MoveUp' }, + { key = 'l', mods = 'NONE', action = act.CopyMode 'MoveRight' }, + { key = 'm', mods = 'ALT', action = act.CopyMode 'MoveToStartOfLineContent' }, + { key = 'o', mods = 'NONE', action = act.CopyMode 'MoveToSelectionOtherEnd' }, + { key = 'q', mods = 'NONE', action = act.CopyMode 'Close' }, + { key = 't', mods = 'NONE', action = act.CopyMode{ JumpForward = { prev_char = true } } }, + { key = 'u', mods = 'CTRL', action = act.CopyMode{ MoveByPage = (-0.5) } }, + { key = 'v', mods = 'NONE', action = act.CopyMode{ SetSelectionMode = 'Cell' } }, + { key = 'v', mods = 'CTRL', action = act.CopyMode{ SetSelectionMode = 'Block' } }, + { key = 'w', mods = 'NONE', action = act.CopyMode 'MoveForwardWord' }, + { key = 'y', mods = 'NONE', action = act.Multiple{ { CopyTo = 'ClipboardAndPrimarySelection' }, { CopyMode = 'Close' } } }, + { key = 'PageUp', mods = 'NONE', action = act.CopyMode 'PageUp' }, + { key = 'PageDown', mods = 'NONE', action = act.CopyMode 'PageDown' }, + { key = 'End', mods = 'NONE', action = act.CopyMode 'MoveToEndOfLineContent' }, + { key = 'Home', mods = 'NONE', action = act.CopyMode 'MoveToStartOfLine' }, + { key = 'LeftArrow', mods = 'NONE', action = act.CopyMode 'MoveLeft' }, + { key = 'LeftArrow', mods = 'ALT', action = act.CopyMode 'MoveBackwardWord' }, + { key = 'RightArrow', mods = 'NONE', action = act.CopyMode 'MoveRight' }, + { key = 'RightArrow', mods = 'ALT', action = act.CopyMode 'MoveForwardWord' }, + { key = 'UpArrow', mods = 'NONE', action = act.CopyMode 'MoveUp' }, + { key = 'DownArrow', mods = 'NONE', action = act.CopyMode 'MoveDown' }, + }, + + search_mode = { + { key = 'Enter', mods = 'NONE', action = act.CopyMode 'PriorMatch' }, + { key = 'Escape', mods = 'NONE', action = act.CopyMode 'Close' }, + { key = 'n', mods = 'CTRL', action = act.CopyMode 'NextMatch' }, + { key = 'p', mods = 'CTRL', action = act.CopyMode 'PriorMatch' }, + { key = 'r', mods = 'CTRL', action = act.CopyMode 'CycleMatchType' }, + { key = 'u', mods = 'CTRL', action = act.CopyMode 'ClearPattern' }, + { key = 'PageUp', mods = 'NONE', action = act.CopyMode 'PriorMatchPage' }, + { key = 'PageDown', mods = 'NONE', action = act.CopyMode 'NextMatchPage' }, + { key = 'UpArrow', mods = 'NONE', action = act.CopyMode 'PriorMatch' }, + { key = 'DownArrow', mods = 'NONE', action = act.CopyMode 'NextMatch' }, + }, + +} + +-- { key = ',', mods = 'CMD', action = act.SpawnCommandInNewTab { +-- cwd = os.getenv('WEZTERM_CONFIG_DIR'), +-- set_environment_variables = { +-- TERM = 'screen-256color', +-- }, +-- args = { +-- 'code', +-- os.getenv('WEZTERM_CONFIG_FILE'), +-- }, +-- }, +-- }, +-- { key = 'R', mods = 'CMD|SHIFT', action = act.PromptInputLine { +-- description = 'Enter new name for tab', +-- action = wezterm.action_callback(function(window, _, line) +-- -- line will be `nil` if they hit escape without entering anything +-- -- An empty string if they just hit enter +-- -- Or the actual line of text they wrote +-- if line then +-- window:active_tab():set_title(line) +-- end +-- end), +-- }, +-- }, +-- -- other keys +-- -- { key = "n", mods = "CTRL", action = act.SpawnCommandInNewTab({ +-- -- args = {"code ."} +-- -- }) +-- -- }, +-- } + + +-- and finally, return the configuration to wezterm +return config diff --git a/chezmoi.roots/_src.posix/private_dot_config/wezterm/wezterm.lua.tmpl b/chezmoi.roots/_src.posix/private_dot_config/wezterm/wezterm.lua.tmpl new file mode 120000 index 0000000..8293cd6 --- /dev/null +++ b/chezmoi.roots/_src.posix/private_dot_config/wezterm/wezterm.lua.tmpl @@ -0,0 +1 @@ +../../../_src.all/private_dot_config/wezterm/wezterm.lua.tmpl \ No newline at end of file