From cc392c16bde5fe394089ea92b623aec2c5635e1f Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 10 Apr 2023 11:12:56 +0330 Subject: updates --- bin/postit.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/postit.sh b/bin/postit.sh index 17589c5..496ddd8 100755 --- a/bin/postit.sh +++ b/bin/postit.sh @@ -1,6 +1,5 @@ #!/usr/bin/env sh -CLIP_HIST_FILE=/tmp/.clip_history -# POSTIT=$(cat ${CLIP_HIST_FILE} | dmenu -l 20 -p "Select Postit:") -sqlite3 $(cat /tmp/lclipd/lclipd_db_name) 'select content from lclipd;' | dmenu -l 20 | xsel -ib -# echo -n "${POSTIT:0:${#POSTIT}}" | xsel -ip +SQL_DB="$(cat /tmp/lclipd/lclipd_db_name)" +content=$(sqlite3 "${SQL_DB}" "select replace(content,char(10),' '),id from lclipd;" | dmenu -fn "DejaVuSansMono Nerd Font Mono-11.3;antialias=true;autohint=true" -D "|" -l 20 -p "lclipd:") +sqlite3 "${SQL_DB}" "select content from lclipd where id = ${content}" | xsel -ib -- cgit v1.2.3