CristianHenzel / ClipIt

ClipIt clipboard manager for GTK+
https://github.com/CristianHenzel/ClipIt
GNU General Public License v3.0
648 stars 84 forks source link

Redirecting the terminal output to clipit is not working #83

Open brainplot opened 6 years ago

brainplot commented 6 years ago

Hello,

I want to pipe the output of a command to clipit in order to have it in my history and paste it wherever I need but it doesn't work. From the clipit's man page:

CLI EXAMPLES
    Put text in the clipboard
       echo "copied to clipboard" | clipit
       clipit "copied to clipboard"

    Put text in the clipboard and print the clipboard contents
        echo "copied to clipboard" | clipit -c

However, I've tried several ways to achieve that but it doesn't seem to work. So far I've tried:

All of the above commands result in my clipboard being somehow empty. If I hit CTRL+V in any text field, or CTRL+SHIFT+V in my terminal, it pastes nothing. It doesn't work if I right click on a text field either because the "Paste" option in the menu is greyed out as if my clipboard is empty, as stated earlier. If I manually select any text though, both in a text field and in my terminal, it'll work as normal.

I installed Clipit from the Arch User Repository through this package.

How can I solve this? Hope I'm not doing anything wrong.

System info:

OS: Arch Linux x86_64 Host: HP Pavilion 15 Notebook PC 0881100000305E00000620100 Kernel: 4.14.12-1-ARCH WM: i3 Theme: Vimix-Dark-Ruby [GTK2/3] Icons: Papirus-Dark [GTK2/3] Terminal: tilix CPU: AMD A6-5200 APU (4) @ 2.00GHz GPU: AMD Radeon HD 8670M

wallace11 commented 6 years ago

You may want to pipe to xclip -selection c in the meanwhile.

brainplot commented 6 years ago

Thank you, that doesn't really solve the problem however.

If I'm not mistaken, I don't have xclip installed at all; and installing it just for this little feature, when I already have a clipboard manager, kind of bugs me.

mgiagante commented 5 years ago

Having the same issue System info:

OS: Manjaro x86_64 Host: sony-vaio-fit-14 Kernel: 4.19.34-1-MANJARO WM: i3 Terminal: urxvt

sljunkie commented 4 years ago

I'm also having the same issue.

Ideapad 330s, Manjaro x86_64, i3, urxvt.

andreiboyanov commented 4 years ago

+1. I'm with Manjaro and i3, clipit is installed by default but not working from the command line. Is it possible that this bug has no attention for more than two years?

Zeioth commented 4 years ago

+1, I'd say this is quite important.

emanuelturis commented 3 years ago

Try piping the results with xsel instead of clipit.

For example echo "Hello!" | xsel -b.

It worked for me with Manjaro i3 Community Edition.

brainplot commented 3 years ago

@emanuelturis Yeah, sure there are ways around this but since this is clipit's issue tracker, it made sense to report the issue anyway. It's good to have your suggestion here for people who come here looking for a workaround though!