diff options
author | Anton Khirnov <anton@khirnov.net> | 2018-06-22 12:35:51 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2018-06-22 12:35:51 +0200 |
commit | f90e2ea391b1f39e30f5c07a0305151406586487 (patch) | |
tree | 7c19c66cc51a34266506bf71d02b764e42bcb815 | |
parent | a893a33ea312167899c12002ace612475e2ecdf6 (diff) |
Make sure windows are spawned on the current tag.
-rw-r--r-- | bindings.lua | 6 | ||||
-rw-r--r-- | utils.lua | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bindings.lua b/bindings.lua index 05217b7..98ecb85 100644 --- a/bindings.lua +++ b/bindings.lua @@ -12,9 +12,9 @@ function M.create(workspace) awful.key({ modkey }, "Pause", function () awful.util.spawn("xscreensaver-command -lock") end), -- program launching - awful.key({ modkey, }, "t", function () awful.util.spawn(commondefs.terminal) end), - awful.key({ modkey, }, "v", function () awful.util.spawn(commondefs.terminal .. " -e alsamixer") end), - awful.key({ modkey, }, "Escape", function () awful.util.spawn(commondefs.terminal .. " -e htop") end), + awful.key({ modkey, }, "t", function () utils.spawn_current(commondefs.terminal) end), + awful.key({ modkey, }, "v", function () utils.spawn_current(commondefs.terminal .. " -e alsamixer") end), + awful.key({ modkey, }, "Escape", function () utils.spawn_current(commondefs.terminal .. " -e htop") end), -- audio control awful.key({ modkey }, "Prior", function () utils.vol_control(1) end), @@ -35,4 +35,8 @@ function M.vol_control(n) awful.util.spawn(cmd) end +function M.spawn_current(command) + awful.spawn(command, {tag = mouse.screen.selected_tag}) +end + return M |