Giter Club home page Giter Club logo

Comments (8)

tcftbl avatar tcftbl commented on May 25, 2024

I did a little digging in the clipmenud code and found out the offending command. xsel -o --clipboard seems to hang when there is a too large picture in the clipboard. I filed a bug report to xsel, but at the same time I was wondering if there is an elegant solution to avoid this problem in clipmenu.

from clipmenu.

cdown avatar cdown commented on May 25, 2024

Hi! Thanks for digging, sorry for the late reply.

I think it might be time to move to xclip, which has -t UTF8_STRING to make it clear which types of content we want to look for.

Does dbb5ce9 make things better for you?

from clipmenu.

tcftbl avatar tcftbl commented on May 25, 2024

dbb5ce9 seems to work nicely with large pictures. However, there seems to be a little side effect. Previously when running clipmenu the list didn't include any previously copied images. After dbb5ce9 on the other hand clipmenu seems to list the images in as a multiline binary mess.

Is it preferable to leave this behaviour as is or should clipmenu ignore pictures entirely?

from clipmenu.

cdown avatar cdown commented on May 25, 2024

Thanks for getting back! Well that's... weird, I don't expect UTF8_STRING to get populated when there's an image. I'll investigate more, thanks.

from clipmenu.

tcftbl avatar tcftbl commented on May 25, 2024

The issue only comes up for me when I use xclip to copy pictures (not for example when copying pictures with an internet browser) by using the command xclip -selection clipboard -t image/png -i image.png. I'm not super familiar with xclip so it could be that I'm just misusing it.

Happy to help and thanks for continuing to maintain this very useful program!

from clipmenu.

cdown avatar cdown commented on May 25, 2024

That's particularly weird because UTF8_STRING isn't even listed in TARGETS. With -verbose, one sees that it's being converted, I guess?

% xclip -verbose -debug -selection clipboard -t UTF8_STRING -o  >/dev/null
Connected to X server.
Using selection: XA_CLIPBOARD
Using UTF8_STRING.
Type is image/png.

One option is to look at TARGETS to see if UTF8_STRING is advertised, but this is racy. On a normal case, one sees:

% xclip -verbose -debug -selection clipboard -t UTF8_STRING -o >/dev/null 
Connected to X server.
Using selection: XA_CLIPBOARD
Using UTF8_STRING.
Type is UTF8_STRING.

from clipmenu.

cdown avatar cdown commented on May 25, 2024

Ah, so it's just freely interpreting:

% xclip -verbose -debug -selection clipboard -t DOESNOTEXIST -o >/dev/null 
Connected to X server.
Using selection: XA_CLIPBOARD
Using DOESNOTEXIST.
Type is image/png.

xclip HEAD errors out on this, albeit not very gracefully:

xclip: Error: window id 0x1e00001 cannot convert CLIPBOARD selection to target 'DOESNOTEXIST'

from clipmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.