Skip to content
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

Replace xclip with xsel #3410

Merged
merged 1 commit into from
Nov 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions chroot-bin/croutonclip
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ copyclip() {
# Check if display is still running
if rundisplay "$current" xdpyinfo >/dev/null 2>&1; then
echo -n 'R'
rundisplay "$current" xclip -o -sel clip
rundisplay "$current" xsel -ob
else
echo -n "EUnable to open display '$current'."
fi
Expand Down Expand Up @@ -71,9 +71,9 @@ copyclip() {
trap "rm -f '$cliptmp'" 0
cat > $cliptmp

if ! rundisplay "$next" xclip -o -sel clip \
if ! rundisplay "$next" xsel -ob \
| diff -q - "$cliptmp" > /dev/null; then
cat "$cliptmp" | rundisplay "$next" xclip -i -sel clip
rundisplay "$next" xsel -ib < "$cliptmp"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even know how a useless use of cat snuck into the codebase to begin with. Thanks for fixing that :)

fi
fi
) && current="$next"
Expand Down Expand Up @@ -158,7 +158,7 @@ addtrap "echo -n > '$CROUTONLOCKDIR/clip' 2>/dev/null"
:
done
) | (
# Do not hold the lock in this subshell and children (especially xclip)
# Do not hold the lock in this subshell and children (especially xsel)
exec 3>/dev/null
while read -r line; do
display="`croutoncycle display`"
Expand Down
2 changes: 1 addition & 1 deletion targets/extension
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
. "${TARGETSDIR:="$PWD"}/common"

### Append to prepare.sh:
install x11-utils xclip
install x11-utils xsel

compile websocket ''

Expand Down