Copy URI to XA_CLIPBOARD on right click
Small patch that copies the match into the default clipboard using gtk_clipboard_set_text(). Maybe consider which clipboard to use (such as PRIMARY OR SECONDARY) instead based on a config option, although that may be overkill (especially since PRIMARY is supposed to be ephemeral or something) Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
This commit is contained in:
parent
531d0851ea
commit
23591fd14f
|
@ -923,6 +923,9 @@ gboolean button_press_cb(VteTerminal *vte, GdkEventButton *event, const config_i
|
||||||
launch_browser(info->browser, match);
|
launch_browser(info->browser, match);
|
||||||
g_free(match);
|
g_free(match);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
} else if(event->button == 3 && event->type == GDK_BUTTON_PRESS && match) {
|
||||||
|
GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
|
||||||
|
gtk_clipboard_set_text(clipboard, match, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue