mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-06 07:36:23 +01:00
17 lines
392 B
Bash
17 lines
392 B
Bash
# create ~/permaclip if it doesnt exist already
|
|
mkdir -p $HOME/permaclip
|
|
|
|
tr_name=$(echo $@ | xargs)
|
|
if [ x"$tr_name" != x"" ]; then
|
|
tr_name="${tr_name% (*}"
|
|
clipdata=$(xclip -selection c -o)
|
|
echo $clipdata > $HOME/permaclip/$tr_name
|
|
fi
|
|
|
|
echo -e "\0markup-rows\x1ftrue"
|
|
|
|
for reg in $(ls ~/permaclip); do
|
|
content=$(cat ~/permaclip/$reg)
|
|
echo -e "$reg (<i>${content:0:30}</i>)"
|
|
done
|