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