]> git.rmz.io Git - dotfiles.git/commitdiff
awesome: add binding for pasting primary selection
authorSamir Benmendil <me@rmz.io>
Sat, 11 Mar 2023 23:43:16 +0000 (23:43 +0000)
committerSamir Benmendil <me@rmz.io>
Mon, 10 Apr 2023 11:18:48 +0000 (12:18 +0100)
awesome/bindings.lua

index e53b301b6b5457f3863d69b32072939327b2bba5..ae2ebafd055ef7036ec50b2063b03f5578e184db 100644 (file)
@@ -144,7 +144,12 @@ globalkeys = gears.table.join(globalkeys,
     -- VimWiki
     awful.key({ modkey }, "i", function ()
         utils.spawn_terminal("vim -c 'call vimwiki#base#goto_index(v:count1)'", { instance = "vimwiki"})
-    end)
+    end),
+    -- clipboard
+    -- requires a little sleep before simulating shift+Insert, otherwise I
+    -- believe the focus is still on awful and not the current window
+    awful.key({ modkey }, "\\", function () awful.spawn('xdotool sleep 0.2 key --clearmodifiers shift+Insert') end,
+              {description = "paste primary selection", group = "awesome"})
 )
 
 -- Client keys {{{1