astrand / xclip

Command line interface to the X11 clipboard
GNU General Public License v2.0
1.03k stars 73 forks source link

Adding -s for -selection and setting changing the default selection #149

Open erikd234 opened 7 months ago

erikd234 commented 7 months ago

Hey! I love xclip and I use it everyday.

I am just getting tired of typing -selection clipboard each time cause thats my main usecase.

I would like to contribute to the project by adding

-s as a shortbut for -selection

and also I would like to add a way to change the default option for selection from primary to clipboard (or any other option if someone wants it.)

Can I go ahead and try to add the implimenation to the source code?

thanks.

TLDR: add for example:

xclip -s clipboard -i < file.txt xclip -selection-default clipboard Thus allowing: xclip -i < file.txt (automatically going to the default option)

Then I guess also adding these options to the -help and man entries. I would like to try and impliment them myself. It would be my first open source contribution :)

erikd234 commented 7 months ago

Update on this is that

-sel exists and I ddint know it becasue its not in the print help

I will make a PR to add it to -help and also add -s to do selection

I also found out through reading the code that -sel c and -sel s work to shorten the selection so that is totally fine no need for seting a default.

erikd234 commented 7 months ago

https://github.com/astrand/xclip/pull/150