- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end)
-)
-
--- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
-clientkeys = awful.util.table.join(
- awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
- awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
- awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
- awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
- awful.key({ modkey, }, "o", awful.client.movetoscreen ),
- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
- awful.key({ modkey }, "t", awful.client.togglemarked),
- awful.key({ modkey,}, "m",
+ awful.prompt.run {
+ prompt = "Eval: ",
+ bg_cursor = '#ff0000',
+ 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 }, "w", function() menubar.show() end,
+ {description = "show the menubar", group = "launcher"}),
+
+ -- Tag helpers
+ awful.key({ modkey, }, "a", function()
+ th.add_tag(nil, {layout=layouts.default} ,true)
+ end,
+ {description = "add a tag", group = "tag"}),
+ awful.key({ modkey, }, "d", th.delete_tag,
+ {description = "delete the current tag", group = "tag"}),
+ awful.key({ modkey, "Shift", }, "a", function()
+ th.move_to_new_tag(nil,nil,true,true,true)
+ end,
+ {description = "add a volatile tag with the focused client", group = "tag"}),
+ awful.key({ modkey, "Shift", "Control" }, "a", function()
+ th.move_to_new_tag(nil,nil,false,true,true)
+ end,
+ {description = "add a permanent tag with the focused client", group = "tag"}),
+ awful.key({ modkey, "Mod1" }, "a", th.copy_tag,
+ {description = "create a copy of the current tag", group = "tag"}),
+ awful.key({ modkey, "Control" }, "a", th.rename_tag,
+ {description = "rename the current tag", group = "tag"}),
+ awful.key({ modkey, "Control", "Shift", "Mod1" }, "a", th.collect_orphan_clients_to_tag,
+ {description = "collect all orphaned clients", group = "client"}),
+
+ awful.key({ modkey }, "y", toggle_tag_by_name("irc", true),
+ {description = "view tag 'irc'", group = "tag"}),
+ awful.key({ modkey, "Control" }, "y", toggle_tag_by_name("irc"),
+ {description = "toggle tag 'irc'", group = "tag"}),
+ awful.key({ modkey }, "u", toggle_tag_by_name("[m]", true),
+ {description = "view tag '[m]'", group = "tag"}),
+ awful.key({ modkey, "Control" }, "u", toggle_tag_by_name("[m]"),
+ {description = "toggle tag '[m]'", group = "tag"}),
+ awful.key({ modkey }, "i", toggle_tag_by_name("cal", true),
+ {description = "view tag 'cal'", group = "tag"}),
+ awful.key({ modkey, "Control" }, "i", toggle_tag_by_name("cal"),
+ {description = "toggle tag 'cal'", group = "tag"}),
+ awful.key({ modkey }, "o", toggle_tag_by_name("chr", true),
+ {description = "view tag 'chr'", group = "tag"}),
+ awful.key({ modkey, "Control" }, "o", toggle_tag_by_name("chr"),
+ {description = "toggle tag 'chr'", group = "tag"}),
+ awful.key({ modkey }, "p", toggle_tag_by_name("ffx", true),
+ {description = "view tag 'ff'", group = "tag"}),
+ awful.key({ modkey, "Control" }, "p", toggle_tag_by_name("ffx"),
+ {description = "toggle tag 'ff'", group = "tag"}),
+{})
+
+clientkeys = gears.table.join(
+ awful.key({ modkey, }, "f",
+ function (c)
+ c.fullscreen = not c.fullscreen
+ c:raise()
+ end,
+ {description = "toggle fullscreen", group = "client"}),
+ awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
+ {description = "close", group = "client"}),
+ awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
+ {description = "toggle floating", group = "client"}),
+ awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
+ {description = "move to master", group = "client"}),
+ awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
+ {description = "toggle keep on top", group = "client"}),
+ awful.key({ modkey, }, "n",
+ function (c)
+ -- The client currently has the input focus, so it cannot be
+ -- minimized, since minimized clients can't have the focus.
+ c.minimized = true
+ end ,
+ {description = "minimize", group = "client"}),
+ awful.key({ modkey, }, "m",
+ function (c)
+ c.maximized = not c.maximized
+ c.maximized_horizontal = false
+ c.maximized_vertical = false
+ c:raise()
+ end ,
+ {description = "(un)maximize", group = "client"}),
+ awful.key({ modkey, "Control" }, "m",
+ function (c)
+ c.maximized_vertical = not c.maximized_vertical
+ c:raise()
+ end ,
+ {description = "(un)maximize vertically", group = "client"}),
+ awful.key({ modkey, "Shift" }, "m",