Conversation
* move to suggests (similar to the optional dependency of the Arch PKGBUILD) Signed-off-by: Thomas Reifenberger <thomas.reifenberger@tngtech.com>
Signed-off-by: Thomas Reifenberger <thomas.reifenberger@tngtech.com>
There was a problem hiding this comment.
Pull request overview
Updates packaging and clipboard integration to remove a hard dependency on xclip, allowing xsel/xclip/wl-clipboard to be optional and used as available.
Changes:
- Linux/X11 clipboard fallback now tries
xselfirst, thenxclip, with an updated error message when neither is available. - Arch packaging metadata updated to prefer
xselwithxclipas a fallback. - Debian package metadata updated to drop
xclipfromDependsand add clipboard tools underSuggests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
please.sh |
Updates X11 clipboard handling to prefer xsel and improves missing-tool messaging. |
PKGBUILD |
Adjusts optdepends to list xsel preferred and xclip as fallback. |
.github/workflows/create-release.yml |
Updates Debian control metadata to move clipboard tools to Suggests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -403,10 +403,12 @@ copy_to_clipboard() { | |||
| if [ "$XDG_SESSION_TYPE" == "wayland" ]; then | |||
| echo -n "${command}" | wl-copy --primary | |||
There was a problem hiding this comment.
On Wayland, this calls wl-copy unconditionally. Since wl-clipboard is now an optional dependency (Suggests/optdepends), this can fail with a plain "command not found". Consider mirroring the X11 logic by checking for wl-copy (and optionally wl-paste) with command -v and emitting a clear error message when missing.
| echo -n "${command}" | wl-copy --primary | |
| if command -v wl-copy &> /dev/null; then | |
| echo -n "${command}" | wl-copy --primary | |
| else | |
| echo "wl-copy is not installed. Please install wl-clipboard to copy to the clipboard on Wayland. Exiting." | |
| exit 1 | |
| fi |
| echo "Neither xsel nor xclip is installed. Exiting." | ||
| exit 1 |
There was a problem hiding this comment.
This error message is written to stdout. For an error path that exits non-zero, it should go to stderr (e.g., redirect the echo) so users can pipe/parse normal output reliably.
As discussed in #67
Works locally installing the .deb in Debian 13 (I did not test it on Arch, but the package is also called xsel in Arch, so I don't expect any surprises)
Note
Low Risk
Low risk: packaging metadata and a small Linux clipboard fallback change; main command-generation logic is untouched.
Overview
Drops the hard Debian dependency on
xclipby moving clipboard tools to suggested/optional dependencies (Suggests: xsel, xclip, wl-clipboard) and updating the ArchPKGBUILDoptdependsto preferxselwithxclipas fallback.Updates
please.shclipboard handling on Linux/X11 to tryxselfirst, thenxclip, and improves the error message when neither is installed.Reviewed by Cursor Bugbot for commit fb21779. Bugbot is set up for automated code reviews on this repo. Configure here.