Em ter, 8 de jan de 2019 às 20:34, Robin Pedersen <robin.a.t.peder...@gmail.com> escreveu: > Does this help? > https://developer.gnome.org/gdk3/stable/gdk3-Selections.html > https://git.suckless.org/surf/file/surf.c.html#l1817 > > Regards Robin.
Hum, yes! It seems that this is the right track. I just changed the definition of *clipboard* in surf.c and now Ctrl-y seems to copy the current URL to the clipboard as I wanted. The only thing I'm missing now is to copy texto selection to clipboard. It seems that the definition of *clipcopy* and *clippaste* in st can help, although I'm not sure yet how to implement it in surf. http://git.suckless.org/st/file/x.c.html For now here is my diff: diff --git a/surf.c b/surf.c index d48fbc9..a3f141c 100644 --- a/surf.c +++ b/surf.c @@ -1816,11 +1816,11 @@ clipboard(Client *c, const Arg *a) { if (a->i) { /* load clipboard uri */ gtk_clipboard_request_text(gtk_clipboard_get( - GDK_SELECTION_PRIMARY), + GDK_SELECTION_CLIPBOARD), pasteuri, c); } else { /* copy uri */ gtk_clipboard_set_text(gtk_clipboard_get( - GDK_SELECTION_PRIMARY), c->targeturi + GDK_SELECTION_CLIPBOARD), c->targeturi ? c->targeturi : geturi(c), -1); } } Em ter, 8 de jan de 2019 às 20:55, Szpak <sz...@reakcja.org> escreveu: > For WebInspector try 'surf -N'. > > Regards, > Marcin Szpak Awesome. Didn't notice that I had to start surf with the -N flag. Thank you! Caio
diff --git a/surf.c b/surf.c index d48fbc9..a3f141c 100644 --- a/surf.c +++ b/surf.c @@ -1816,11 +1816,11 @@ clipboard(Client *c, const Arg *a) { if (a->i) { /* load clipboard uri */ gtk_clipboard_request_text(gtk_clipboard_get( - GDK_SELECTION_PRIMARY), + GDK_SELECTION_CLIPBOARD), pasteuri, c); } else { /* copy uri */ gtk_clipboard_set_text(gtk_clipboard_get( - GDK_SELECTION_PRIMARY), c->targeturi + GDK_SELECTION_CLIPBOARD), c->targeturi ? c->targeturi : geturi(c), -1); } }