20 lines
448 B
Bash
Executable file
20 lines
448 B
Bash
Executable file
#!/bin/bash
|
|
|
|
cb_count=$(copyq count)
|
|
cb_count=10
|
|
|
|
wofilist=""
|
|
|
|
for i in $(seq $cb_count);do
|
|
cb_line="$( copyq read $((${i}-1)) | tr '\n' ' ' )"
|
|
echo "${cb_line}"
|
|
if [[ "${cb_line}" == "" ]];then
|
|
cb_line=$( copyq read ? "$((${i}-1))" | head -n 1 )
|
|
fi
|
|
wofilist="${wofilist}${setnl}${i}. ${cb_line}"
|
|
setnl="\n"
|
|
done
|
|
|
|
selected=$( echo -e "${wofilist}" | wofi -i --dmenu -k /dev/null | cut -d. -f1)
|
|
|
|
copyq select "$(( ${selected}-1)) "
|