Use xsel instead of xclip when inside Tmux

This commit is contained in:
Thomas Dehaeze 2020-03-16 12:15:30 +01:00
parent 4ac07e5a47
commit 354cc4a6dd
3 changed files with 3 additions and 3 deletions

View File

@ -225,7 +225,7 @@ colors() {
tmpfile=$(mktemp -t transferXXX)
# basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g')
curl --progress-bar --upload-file "$1" "https://transfer.sh/" >> $tmpfile;
cat $tmpfile | xclip -selection clipboard;
cat $tmpfile | xsel -ib;
echo "Copied:" $(cat $tmpfile);
rm -f $tmpfile;
}

View File

@ -32,7 +32,7 @@ Press =C-x= to activate to key handler.
"C-r")
convert -rotate 90 "$file" "$file" ;;
"C-c")
echo -n "$file" | xclip -selection clipboard ;;
echo -n "$file" | xsel -ib ;;
"C-w")
nitrogen --save --set-zoom-fill "$file" ;;
esac

View File

@ -172,7 +172,7 @@ Finally, lock the screen using =i3lock=.
if [ -n "$1" ]; then
xdotool key Shift+Insert
else
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
echo "$chosen" | tr -d '\n' | xsel -ib
notify-send "'$chosen' copied to clipboard." &
fi
#+end_src