Skip to content

Commit 4ae663e

Browse files
committed
home/wezterm: disable click to open url
Too may mis-clicks
1 parent 5e79bd8 commit 4ae663e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

home/dot_config/wezterm/wezterm.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,29 @@ config.keys = {
279279
},
280280
}
281281

282+
-- https://www.reddit.com/r/wezterm/comments/10jda7o/is_there_a_way_not_to_open_urls_on_simple_click/
283+
-- Disable the default click behavior of clicking on a URL to open it.
284+
config.mouse_bindings = {
285+
-- Disable the default click behavior
286+
{
287+
event = { Up = { streak = 1, button = "Left" } },
288+
mods = "NONE",
289+
action = wezterm.action.DisableDefaultAssignment, -- You may want a different option here. See /u/Brian's comment below
290+
},
291+
-- Ctrl-click will open the link under the mouse cursor
292+
{
293+
event = { Up = { streak = 1, button = "Left" } },
294+
mods = "CTRL",
295+
action = wezterm.action.OpenLinkAtMouseCursor,
296+
},
297+
-- Disable the Ctrl-click down event to stop programs from seeing it when a URL is clicked
298+
{
299+
event = { Down = { streak = 1, button = "Left" } },
300+
mods = "CTRL",
301+
action = wezterm.action.Nop,
302+
},
303+
}
304+
282305
config.key_tables = {
283306
-- Defines the keys that are active in our resize-pane mode.
284307
-- Since we're likely to want to make multiple adjustments,

0 commit comments

Comments
 (0)