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)
|
tmpfile=$(mktemp -t transferXXX)
|
||||||
# basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g')
|
# basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g')
|
||||||
curl --progress-bar --upload-file "$1" "https://transfer.sh/" >> $tmpfile;
|
curl --progress-bar --upload-file "$1" "https://transfer.sh/" >> $tmpfile;
|
||||||
cat $tmpfile | xclip -selection clipboard;
|
cat $tmpfile | xsel -ib;
|
||||||
echo "Copied:" $(cat $tmpfile);
|
echo "Copied:" $(cat $tmpfile);
|
||||||
rm -f $tmpfile;
|
rm -f $tmpfile;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ Press =C-x= to activate to key handler.
|
|||||||
"C-r")
|
"C-r")
|
||||||
convert -rotate 90 "$file" "$file" ;;
|
convert -rotate 90 "$file" "$file" ;;
|
||||||
"C-c")
|
"C-c")
|
||||||
echo -n "$file" | xclip -selection clipboard ;;
|
echo -n "$file" | xsel -ib ;;
|
||||||
"C-w")
|
"C-w")
|
||||||
nitrogen --save --set-zoom-fill "$file" ;;
|
nitrogen --save --set-zoom-fill "$file" ;;
|
||||||
esac
|
esac
|
||||||
|
@ -172,7 +172,7 @@ Finally, lock the screen using =i3lock=.
|
|||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
xdotool key Shift+Insert
|
xdotool key Shift+Insert
|
||||||
else
|
else
|
||||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
echo "$chosen" | tr -d '\n' | xsel -ib
|
||||||
notify-send "'$chosen' copied to clipboard." &
|
notify-send "'$chosen' copied to clipboard." &
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Loading…
Reference in New Issue
Block a user