sudo apt-get install xsel xbindkeys
gedit ~ / bin / st-clip
#!/bin/bash
if [[ $# -lt 2 ]]; then
echo "Usage: $0 (save|load) NUM"
exit 1
fi
op=$1
num=$2
DIR=$HOME/.clips
FILE=$DIR/clip-$num
if [ ! -e "$DIR" ]
then
mkdir -p "$DIR"
chmod 700 $DIR
fi
case "$op" in
"save" )
xsel -o > $FILE
;;
"load" )
cat $FILE | xsel --clipboard -i
xvkbd -xsendevent -text "\[Control_L]\[v]"
;;
*)
echo "Wrong operation. Allowed \" save\ " and \" load\ "."
exit 1
esac
* This source code was highlighted with Source Code Highlighter .
chmod + x ~ / bin / st-clip
gedit ~ / .xbindkeysrc
"St-clip save 1"
Control + Alt + 1
"St-clip load 1"
Control + Shift + 1
"St-clip save 2"
Control + Alt + 2
"St-clip load 2"
Control + Shift + 2
"St-clip save 3"
Control + Alt + 3
"St-clip load 3"
Control + Shift + 3
Source: https://habr.com/ru/post/49939/
All Articles