diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2023-12-09 09:05:12 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2023-12-15 11:03:45 +0900 |
commit | 3677c78c2d4d5382e18a0065c0d880979568ace1 (patch) | |
tree | c57aa90609c57302dd3fef3acd2e06119e65ef2e /awesome | |
parent | 81897b76214d191340e2451278b0f2568757b9bf (diff) | |
download | dotfiles-3677c78c2d4d5382e18a0065c0d880979568ace1.tar.gz |
Implement threa client directly in awesome
Diffstat (limited to 'awesome')
-rw-r--r-- | awesome/.config/awesome/rc.lua | 7 |
1 files changed, 5 insertions, 2 deletions
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 |