diff --git a/wezterm/wezterm.lua b/wezterm/wezterm.lua index 2cdac66..ac7a23f 100644 --- a/wezterm/wezterm.lua +++ b/wezterm/wezterm.lua @@ -209,6 +209,32 @@ end) -------------------------------------------------------------------------------- +local act = wezterm.action + +-- Some stuff below borrowed from comments here: https://github.com/wez/wezterm/issues/119 +config.mouse_bindings = { + { + event = { Up = { streak = 1, button = "Left" } }, + mods = "NONE", + action = act.CompleteSelection("PrimarySelection"), + }, + + -- ctrl+click to open urls, etc. + { + event = { Up = { streak = 1, button = "Left" } }, + mods = "CTRL", + action = act.OpenLinkAtMouseCursor, + }, + -- prevents weird behaviours from occuring given the about ctrl+click binding + { + event = { Down = { streak = 1, button = "Left" } }, + mods = "CTRL", + action = act.Nop, + }, +} + +-------------------------------------------------------------------------------- + -- copied from https://github.com/wez/wezterm/issues/4331 -- however it has some issues, seems to reset color theme to default?