Use xsel instead of xclip when inside Tmux
This commit is contained in:
parent
4ac07e5a47
commit
354cc4a6dd
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user