mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
config: add show-urls-copy action
This works just like show-urls-launch, except that instead of opening the URL (typically using xdg-open), it is placed in the clipboard when activated.
This commit is contained in:
parent
b17a392b8c
commit
93181649b3
8 changed files with 52 additions and 20 deletions
10
input.c
10
input.c
|
|
@ -272,12 +272,18 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
return true;
|
||||
}
|
||||
|
||||
case BIND_ACTION_SHOW_URLS_LAUNCH:
|
||||
case BIND_ACTION_SHOW_URLS_COPY:
|
||||
case BIND_ACTION_SHOW_URLS_LAUNCH: {
|
||||
xassert(!urls_mode_is_active(term));
|
||||
|
||||
urls_collect(term);
|
||||
enum url_action url_action = action == BIND_ACTION_SHOW_URLS_COPY
|
||||
? URL_ACTION_COPY
|
||||
: URL_ACTION_LAUNCH;
|
||||
|
||||
urls_collect(term, url_action);
|
||||
render_refresh_urls(term);
|
||||
return true;
|
||||
}
|
||||
|
||||
case BIND_ACTION_SELECT_BEGIN:
|
||||
selection_start(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue