]> git.rmz.io Git - dotfiles.git/commitdiff
awesome: fix bindings for modkey+space and others involving mypromptbox
authorSamir Benmendil <me@rmz.io>
Tue, 31 Jan 2017 01:11:07 +0000 (01:11 +0000)
committerSamir Benmendil <me@rmz.io>
Tue, 31 Jan 2017 01:11:07 +0000 (01:11 +0000)
awesome/bindings.lua

index 457e9366034d513f5429613757c2397c8d1eb235..5d9937b32672e33e8fb1f8046ed980a74613e384 100644 (file)
@@ -53,11 +53,14 @@ globalkeys = awful.util.table.join(globalkeys,
 
     awful.key({ modkey }, "x",
               function ()
-                  awful.prompt.run({ prompt = "Run Lua code: " },
-                  mypromptbox[mouse.screen].widget,
-                  awful.util.eval, nil,
-                  awful.util.getdir("cache") .. "/history_eval")
-              end),
+                  awful.prompt.run {
+                    prompt       = "Run Lua code: ",
+                    textbox      = awful.screen.focused().mypromptbox.widget,
+                    exe_callback = awful.util.eval,
+                    history_path = awful.util.get_cache_dir() .. "/history_eval"
+                  }
+              end,
+              {description = "lua execute prompt", group = "awesome"}),
     -- Menubar
     -- awful.key({ modkey }, "p", function() menubar.show() end),
 
@@ -70,7 +73,7 @@ globalkeys = awful.util.table.join(globalkeys,
     -- Menu
     awful.key({ modkey }, "w", function () mymainmenu:show({ coords = { x = 0, y = 0}}) end),
     -- Prompt
-    awful.key({ modkey }, "space", function () mypromptbox[mouse.screen]:run() end),
+    awful.key({ modkey }, "space", function () awful.screen.focused().mypromptbox:run() end),
     -- switch layout
     awful.key({ modkey }, "]", function () awful.layout.inc( 1, mouse.screen, layouts) end),
     awful.key({ modkey }, "[", function () awful.layout.inc(-1, mouse.screen, layouts) end),