Aloxaf / silicon

Create beautiful image of your source code.
MIT License
3.17k stars 84 forks source link

Should not just use `xclip` #236

Open zefr0x opened 1 year ago

zefr0x commented 1 year ago

Regarding this function: https://github.com/Aloxaf/silicon/blob/cf3668c9ee43ebdae608db3f7b3449c588b8411f/src/bin/silicon/main.rs#L25-L40

In Linux the xclip command just work on X11, not Wayland.

Options:

  1. xclip could be an optional dependency alongside with wl-clipboard, and warn the user if he don't have any one of them.
  2. Depend on Rust libraries to handle clipboard for both X11 and Wayland without using an external tool.
  3. Just support Wayland and deprecating X11 support using 1 or 2.
chris-av commented 1 year ago

Also a linux user, and use wl-clipboard. The only reason I have xclip on my system is because of silicon. Would definitely appreciate if the code took Wayland into account.

pixlmint commented 2 months ago

I am on Ubuntu 24.04 Wayland, wl-clipboard was not installed by default and silicon just failed, it should check if wl-clipboard is installed just like it does with xclip