Giter Site home page Giter Site logo

Comments (10)

okbob avatar okbob commented on June 15, 2024 1

released in 5.8.3

Thank you for checks

from pspg.

okbob avatar okbob commented on June 15, 2024

please check b3d96ff

from pspg.

gus-sipc avatar gus-sipc commented on June 15, 2024

I've tried using this new version of pspg with the --clipboard-app=4 parameter, and when I press the Ins key to copy some information to the clipboard, I receive the following error:

Cannot write to clipboard (clip.exe) (press any key)

clip.exe is available and works in the same way as pbcopy; for example:

echo Test | clip.exe

... effectively copies the Test text to the clipboard.

Is it possible for pspg to use clip.exe in the same way that it is using pbcopy?

from pspg.

okbob avatar okbob commented on June 15, 2024

please try 463ab29

from pspg.

gus-sipc avatar gus-sipc commented on June 15, 2024

I've tried using this new version of pspg with the --clipboard-app=4 parameter, and when I press the Ins key to copy some information to the clipboard, the text is now copied correctly. Thank you for this useful addition to pspg!

If I ran pspg without the --clipboard-app=4 parameter, the clipboard detection algorithm automatically selects xclip instead of clip.exe, since xclip is also available in my WSL2 environment, but it doesn't work because I don't have an X-server running. The error I receive when I press the Ins key in this case is:

 Cannot write to clipboard (Error: Can't open display: :0) (press any key)

Is it possible for the clipboard detection algorithm to look for clip.exe before looking for xclip, so that in a WSL2 environment clip.exe can be automatically selected?

from pspg.

okbob avatar okbob commented on June 15, 2024

from pspg.

okbob avatar okbob commented on June 15, 2024

pá 12. 4. 2024 v 17:18 odesílatel Gus @.> napsal:
I've tried using this new version of pspg with the --clipboard-app=4 parameter, and when I press the Ins key to copy some information to the clipboard, the text is now copied correctly. Thank you for this useful addition to pspg! If I ran pspg without the --clipboard-app=4 parameter, the clipboard detection algorithm automatically selects xclip instead of clip.exe, since xclip is also available in my WSL2 environment, but it doesn't work because I don't have an X-server running. The error I receive when I press the Ins key in this case is: Cannot write to clipboard (Error: Can't open display: :0) (press any key) Is it possible for the clipboard detection algorithm to look for clip.exe before looking for xclip, so that in a WSL2 environment clip.exe can be automatically selected?
yes, it does

pspg/src/pspg.c

Line 1832 in 463ab29

check_clipboard_app(Options *opts, bool *force_refresh)


— Reply to this email directly, view it on GitHub <#242 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO46LGBQ5C6XZZNKDKLDY473M3AVCNFSM6AAAAABF62ZQLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJRHE3DIOJVG4 . You are receiving this because you commented.Message ID: @.
>

There will be always conflict - what clipboard application should be used (when there are more possibilities). This is reason why there are an option --clipboard-app. Maybe I can do check if xserver is defined or not, if this is possible by some way.

from pspg.

okbob avatar okbob commented on June 15, 2024

Unfortunately is not easy detect, so xserver is not installed or doesn't work. I didn't find any environment variables that should to work on modern and old unixes. You can save this option to configure file, and it should to work

from pspg.

gus-sipc avatar gus-sipc commented on June 15, 2024

I think it should be safe to check for "clip.exe" first, since a ".exe" program should never be available outside a WSL2 environment.

Inside a WSL2 environment, "clip.exe" is the best option because it is provided by the host Windows operating system. The other clipboard programs provided by Linux environments require further configuration (such as X-server installation) to work correctly with Windows clipboard.

If you agree, I can send a PR to check for "clip.exe" first.

from pspg.

okbob avatar okbob commented on June 15, 2024

from pspg.

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.