On Mon, 15 Jul 2013, Trent W. Buck wrote:

> Tim Connors <[email protected]>
> writes:
>
> >> clipboard management.
> >
> > wmcliphist.  aw, no longer in debian.  I swear, software never
> > improves.  I'm going back to the abacus.
>
> There's a bunch of stand-alone clipboard managers in apt, because the
> gnome one is built into gnome-settings-daemon, so you can't have it
> without pulling in a lot of other shit you don't want (e.g. last time I
> used it, g-s-d would turn off your .xmodmap and .gtkrc-2.0 and use its
> own versions from %gconf-tree.xml).

Heh, I just disabled g-s-d the other day after upgrading to wheezy and
discovering that it and dconf have now taken over the screensaver despite
xscreensaver running.  As is standard practice with all things gnome,
there's no documentation of how to disable this.

Ideally I'd be able to give it a whitelist of things it is allowed to
touch rather than work out what it has stolen and blacklist if possible.

> I can't vouch for any of them.  If I need to copy something into webkit,
> I write it to /tmp/x then browse to file:///tmp/x and copy from within
> the browser.  (I don't need to do it much.)

> cat bin/mozclip.sh  # which is bound to Alt-F1-e in fvwm
#!/bin/bash

# This program takes the X clipboard buffer, and runs mozilla with the URL in 
the clipboard.
# For use when the browser of choice doesn't for example support flash, and you 
want mozilla
# to display it

URL=`xcb -S 0 ; xcb -p 0`   # store into primary, then print.  Not &&, because 
sometimes the store fails, but the primary still contains a useful selection
reset_type   # xcb stores UTF8_STRING.  This breaks emacs: bug #649837  Reset 
the cut buffer to STRING, which of course nulls out the contents of the buffer, 
but that's fine, because we have already copied it.
echo "$URL" | cat2linesurl.sh   # takes any number of lines, strips leading and 
trailing whitespace and fires off a $BROWSER


> cat reset_type.c:
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
int main()
{
  Display *dpy;
  Window window;
  int i;
  unsigned char *data = "";
  dpy = XOpenDisplay(NULL);
  window = RootWindow(dpy, 0);
  for (i = 9; i < 17; i++) {
    printf("i = %d\n", i);
    XChangeProperty(dpy, window, (Atom)i, XA_STRING, 8, PropModeReplace,
                    data, 0);
  }
  XFlush(dpy);

  exit(0);
}



-- 
Tim Connors
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to