Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MIME type by default (e.g., -t image/jpeg) particularly for CLIPBOARD #103

Open
hackerb9 opened this issue Nov 1, 2020 · 0 comments

Comments

@hackerb9
Copy link
Collaborator

hackerb9 commented Nov 1, 2020

It would be beneficial to users if xclip was smart enough to call file (if available) on documents being read and set the target appropriately.

type=$(file --brief --mime-type foo.pnm)
xclip -c -t $type foo.pnm

could more easily be typed as

xclip -c foo.pnm

For example, xclip could look for input coming from a file when -t is not specified, and then set the target appropriately based on file --mime-type --brief FILENAME. This effect could be limited to only the CLIPBOARD selection, since PRIMARY and SECONDARY do often contain just text. (That's my preference). Or, it could be triggered by a special option, such as -t auto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant