Update wezterm config
This commit is contained in:
parent
238f3ea099
commit
12e47a8613
44 changed files with 10874 additions and 171 deletions
|
@ -1,11 +1,11 @@
|
|||
local wezterm = require("wezterm")
|
||||
local wezterm = require("wezterm") --[[@as Wezterm]]
|
||||
|
||||
local config = {}
|
||||
|
||||
-- color scheme
|
||||
config.color_scheme = "Everforest Dark Soft (Gogh)"
|
||||
-- font
|
||||
config.font = wezterm.font("Fantasque Sans Mono")
|
||||
config.font = wezterm.font("Hack")
|
||||
config.font_size = 14.0
|
||||
-- Ligatures in terminal/programming fonts IMO are a bad idea,
|
||||
-- as they require the user to mentally translate what the ligature represents,
|
||||
|
@ -31,4 +31,7 @@ config.inactive_pane_hsb = {
|
|||
-- scrollbar
|
||||
config.enable_scroll_bar = true
|
||||
|
||||
-- cursor
|
||||
config.default_cursor_style = 'SteadyBar'
|
||||
|
||||
return config
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
local wezterm = require("wezterm")
|
||||
local wezterm = require("wezterm") --[[@as Wezterm]]
|
||||
local util = require("util")
|
||||
local act = wezterm.action
|
||||
|
||||
-- We override the key bindings here, so as to explicitly define what they are rather than relying on default values.
|
||||
local keys = {
|
||||
-- Tab Management
|
||||
{ key = "T", mods = "SHIFT|CTRL", action = act.SpawnTab "CurrentPaneDomain" },
|
||||
|
@ -50,6 +52,8 @@ local keys = {
|
|||
{ key = "Insert", mods = "CTRL", action = act.CopyTo "PrimarySelection" },
|
||||
{ key = "Copy", mods = "NONE", action = act.CopyTo "Clipboard" },
|
||||
{ key = "Paste", mods = "NONE", action = act.PasteFrom "Clipboard" },
|
||||
-- Other
|
||||
{ key = "G", mods = "SHIFT|CTRL", action = wezterm.action_callback(util.open_last_output_in_less) },
|
||||
}
|
||||
|
||||
local key_tables = {
|
||||
|
@ -119,9 +123,56 @@ local key_tables = {
|
|||
}
|
||||
}
|
||||
|
||||
-- We also override the default mouse bindings, and the reasons are as follows:
|
||||
-- 1) The default bindings often clobber the system clipboard, which I don't want, and
|
||||
-- 2) Some of the default bindings are frivolous and unnecessary
|
||||
local mouse_bindings = {
|
||||
-- Left mouse button click
|
||||
{
|
||||
event = { Down = { streak = 1, button = "Left" } },
|
||||
action = act.SelectTextAtMouseCursor("Cell"),
|
||||
mods = "NONE"
|
||||
},
|
||||
{
|
||||
event = { Up = { streak = 1, button = "Left" } },
|
||||
action = act.CompleteSelectionOrOpenLinkAtMouseCursor("PrimarySelection"),
|
||||
mods = "NONE"
|
||||
},
|
||||
-- Middle mouse button click
|
||||
{
|
||||
event = { Down = { streak = 1, button = "Middle" } },
|
||||
action = act.PasteFrom("PrimarySelection"),
|
||||
mods = "NONE"
|
||||
},
|
||||
{
|
||||
event = { Down = { streak = 1, button = "Middle" } },
|
||||
action = act.PasteFrom("Clipboard"),
|
||||
mods = "ALT"
|
||||
},
|
||||
-- Right mouse button click
|
||||
{
|
||||
event = { Down = { streak = 1, button = "Right" } },
|
||||
action = act.SelectTextAtMouseCursor("SemanticZone"),
|
||||
mods = "CTRL|SHIFT"
|
||||
},
|
||||
-- Left mouse button drag
|
||||
{
|
||||
event = { Drag = { streak = 1, button = "Left" } },
|
||||
action = act.ExtendSelectionToMouseCursor("Cell"),
|
||||
mods = "NONE"
|
||||
},
|
||||
{
|
||||
event = { Drag = { streak = 1, button = "Left" } },
|
||||
action = act.StartWindowDrag,
|
||||
mods = "SUPER"
|
||||
}
|
||||
}
|
||||
|
||||
local config = {}
|
||||
config.keys = keys
|
||||
config.disable_default_key_bindings = true
|
||||
config.disable_default_mouse_bindings = true
|
||||
config.key_tables = key_tables
|
||||
config.mouse_bindings = mouse_bindings
|
||||
|
||||
return config
|
||||
|
|
|
@ -7,5 +7,6 @@ config.exit_behavior = 'Close'
|
|||
config.exit_behavior_messaging = 'Verbose'
|
||||
config.status_update_interval = 25
|
||||
config.default_prog = { '/usr/local/bin/hilbish', '-l' }
|
||||
config.switch_to_last_active_tab_when_closing_tab = true
|
||||
|
||||
return config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue