> When I start a blank installation of surf and try to copy any url into
> my clipboard via ctrl-y (as stated in the man pages), it won't copy
> anything at all. Is the man page outdated? Am I doing anything wrong? Do
> I need to install some userscripts for this?

Ctrl-y copies url into primary selection, which is different from
clipboard. I've attached a patch that changes this to use clipboard, if
you'd prefer that.

There is also a program called autocutsel, which allows synchronization
between primary selection and clipboard.

You'd add something like this to .xinitrc:
autocutsel -selection CLIPBOARD -fork
autocutsel -selection PRIMARY -fork

Which will essentially merge clipboard and primary selection. This will
be a global change, which might not be what you want.

Regards,
mmokulus
diff --git a/surf.c b/surf.c
index 474c01b..c442fa7 100644
--- a/surf.c
+++ b/surf.c
@@ -1845,11 +1845,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);
        }
 }

Reply via email to