From 3677c78c2d4d5382e18a0065c0d880979568ace1 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sat, 9 Dec 2023 09:05:12 +0900 Subject: Implement threa client directly in awesome --- awesome/.config/awesome/rc.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'awesome/.config') diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 52dbef0..38a9c75 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -1,4 +1,5 @@ -- Standard library +local io = {open = io.open} local pi = math.pi -- Awesome library @@ -147,7 +148,6 @@ local mymainmenu = freedesktop.menu.build{ local function showclipboard() local base = home .. "/.cache/threa/" - local command = "threac %s && xdotool key shift+Insert" local f = io.open(base .. "order") local order = f:read("*a") f:close() @@ -156,7 +156,10 @@ local function showclipboard() for c in order:gmatch(".") do local f = io.open(base .. c) table.insert(items, {f:read("*a"):gsub("\n", " "), function () - awful.spawn.with_shell(command:format(c)) + local new_order = order:gsub(c .. "(.*)", "%1" .. c) + io.open(base .. "order", "w"):write(new_order):close() + awful.spawn.easy_async("clipbuzz", spawner"xdotool key shift+Insert") + awful.spawn(("xclip %s"):format(base .. c)) end}) f:close() end -- cgit 1.4.1