aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2023-04-10 07:42:56 +0000
committerterminaldweller <devi@terminaldweller.com>2023-04-10 07:42:56 +0000
commitcc392c16bde5fe394089ea92b623aec2c5635e1f (patch)
treea35a55ca7995ee95dac95f28aa79ef904238cdc2 /bin
parentupdates (diff)
downloadscripts-cc392c16bde5fe394089ea92b623aec2c5635e1f.tar.gz
scripts-cc392c16bde5fe394089ea92b623aec2c5635e1f.zip
updates
Diffstat (limited to 'bin')
-rwxr-xr-xbin/postit.sh7
1 files changed, 3 insertions, 4 deletions
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