mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04:00
config: add new mouse binding ‘launch-url’, bind to alt+BTN_LEFT
This adds a new mouse binding, launch-url (bound to Alt+BTN_LEFT by default). When executed, the URL under the mouse pointer is launched (with url.launcher, as usual). This is done by calling urls_collect(), to get all currently visible URLs (both auto-detected and OSC-8 ones), and then iterating them all until we find one that spans the cell the mouse pointer is on.
This commit is contained in:
parent
8b882b3a13
commit
16d220d3f9
3 changed files with 39 additions and 1 deletions
|
|
@ -47,9 +47,10 @@ enum bind_action_normal {
|
|||
BIND_ACTION_SELECT_WORD,
|
||||
BIND_ACTION_SELECT_WORD_WS,
|
||||
BIND_ACTION_SELECT_ROW,
|
||||
BIND_ACTION_LAUNCH_URL,
|
||||
|
||||
BIND_ACTION_KEY_COUNT = BIND_ACTION_PROMPT_NEXT + 1,
|
||||
BIND_ACTION_COUNT = BIND_ACTION_SELECT_ROW + 1,
|
||||
BIND_ACTION_COUNT = BIND_ACTION_LAUNCH_URL + 1,
|
||||
};
|
||||
|
||||
enum bind_action_search {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue