summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bindings.lua6
-rw-r--r--utils.lua4
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),
diff --git a/utils.lua b/utils.lua
index a29a50f..bd3516d 100644
--- a/utils.lua
+++ b/utils.lua
@@ -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