From: Samir Benmendil Date: Wed, 21 Feb 2024 01:15:42 +0000 (+0000) Subject: wezterm: open urls with keys bind X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/5c84235cdab6e69ddc4f54deef97dbac6e6b78c2 wezterm: open urls with keys bind --- diff --git a/wezterm/wezterm.lua b/wezterm/wezterm.lua index a4627b1..ba4fc68 100644 --- a/wezterm/wezterm.lua +++ b/wezterm/wezterm.lua @@ -17,4 +17,22 @@ config.tab_bar_at_bottom = true config.quick_select_alphabet = "aoeuisnthd" +config.keys = { + { + key = 'F', + mods = 'CTRL', + action = wezterm.action.QuickSelectArgs { + label = 'open url', + patterns = { + 'https?://\\S+', + }, + action = wezterm.action_callback(function (win, pane) + local url = win:get_selection_text_for_pane(pane) + wezterm.log_info('opening: ' .. url) + wezterm.open_with(url) + end), + }, + }, +} + return config