From 0045471552786e887ece64f6004649d2bd312abf Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Wed, 15 Feb 2023 13:51:27 +0330 Subject: README update --- README.md | 9 +++++++-- lclipd.lua | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a39059..4bc01cc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # lclip -a minimal clip manager in lua +a minimal clip manager in lua.
+This is technically just the back-end. I'm using dmenu as the front-end but it has its limitations.
+```sh +sqlite3 $(cat /tmp/lclipd_db_name) 'select content from lclipd;' | dmenu +``` ## TODO -Use sqlite instead of hand-rolling a file.
+* The DB permissions are not being taken care of.
+* This doesn't support wayland yet.
diff --git a/lclipd.lua b/lclipd.lua index 1e339ae..031ff78 100755 --- a/lclipd.lua +++ b/lclipd.lua @@ -3,7 +3,8 @@ -- needs xsel, clipnotify -- luarocks-5.3 install --local luaposix -- luarocks-5.3 install --local argparse --- cat .clip_history | dmenu -l 10 | xsel -ib +-- luarocks-5.3 install --local lsqlite3 +-- sqlite3 $(cat /tmp/lclipd_db_name) 'select content from lclipd;' | dmenu -l 10 | xsel -ib local string = require("string") local signal = require("posix.signal") local argparse = require("argparse") @@ -110,6 +111,7 @@ local function get_clipboard_content() local handle_x = io.popen("xsel -ob") local last_clip_entry_x = handle_x:read("*a") + -- FIXME- fix for wayland -- local wait_for_event_w = io.popen("clipnotify") -- local handle_w = io.popen("wl-paste") -- local last_clip_entry_w = handle_w:read("*a") -- cgit v1.2.3