Skip to content

Switch to cli-clipboard #258

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

Closed

Conversation

ignatenkobrain
Copy link
Contributor

It has proper support for Wayland clipboard in CLI applications and is
automatically falling back to X11 when that fails.

Closes: #256
Signed-off-by: Igor Raits i.gnatenko.brain@gmail.com

It has proper support for Wayland clipboard in CLI applications and is
automatically falling back to X11 when that fails.

Closes: gitui-org#256
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
@ignatenkobrain
Copy link
Contributor Author

I did not test macos/windows, but on Linux (Fedora with GNOME, both X11 and Wayland sessions) works just fine.

@extrawurst
Copy link
Collaborator

extrawurst commented Aug 29, 2020

@ignatenkobrain cool thanks for going at this. Does this change anything about the new dependencies clipboard on Linux required in the CI? See https://github.com/extrawurst/gitui/blob/master/.github/workflows/ci.yml#L36

@ignatenkobrain
Copy link
Contributor Author

@extrawurst I don't think it changes anything here because it still uses x11-clipboard for X11 (which clipboard also uses, though older version) and wayland one uses by default Rust implementation of wayland stuff so no new dependencies are needed.

I am not familiar with Ubuntu split of X11, but on Fedora is was enough to install libxcb-devel. Probably you could even change it like this:

-        sudo apt-get -qq install libxcb-shape0-dev libxcb-xfixes0-dev
+        sudo apt-get -qq install libxcb1-dev libxcb-xfixes0-dev

@extrawurst
Copy link
Collaborator

@ignatenkobrain this seems to work on macOS, but currently I am reluctant to merge this before we have the linux distribution problem solved: #259

@ignatenkobrain
Copy link
Contributor Author

Fine with me, no rush.

@extrawurst
Copy link
Collaborator

@ignatenkobrain change of plans, since we obviously cannot use x11 and the clipboard feature in static binaries I removed this feature from the linux version for now. on discord we are considering the options here now. maybe you want to chime in:

  1. is there a way to build against this stuff statically (musl)
  2. going the tig/neovim way and use a shell call to xclip or xsel to fill the clipboard - how probable is such a tool to be installed on a regular linux distro?

@wezm
Copy link
Contributor

wezm commented Sep 1, 2020

how probable is such a tool to be installed on a regular linux distro?

I think it's unlikely these would be installed by default on a regular distro/BSD. I'm not sure that's a huge issue though. If the gitui was unable to spawn the process it could tell the user that they need to install it.

@extrawurst
Copy link
Collaborator

closes in favour of #262

@extrawurst extrawurst closed this Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE: Switch from clipboard to copypasta
3 participants