Menubar: Add shell completion to menubar

Since we can search for commands in menubar and easily execute almost
any program now, we can definitely make use of awful.shell.completion,
which is enabled with this commit.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Ignas Anikevicius (gns_ank) 2012-05-04 23:09:03 +01:00 committed by Uli Schlachter
parent b246e87b1a
commit 1730d4f1ea
1 changed files with 6 additions and 4 deletions

View File

@ -240,10 +240,12 @@ function show(scr)
current_item = 1
current_category = nil
menulist_update()
awful.prompt.run({ prompt = "Run app: " }, instance.prompt.widget, function(s) end,
nil, awful.util.getdir("cache") .. "/history_menu", nil, hide,
menulist_update,
prompt_keypressed_callback)
awful.prompt.run({ prompt = "Run: " }, instance.prompt.widget,
function(s) end, -- exe_callback function set to do nothing
awful.completion.shell, -- completion_callback
awful.util.getdir("cache") .. "/history_menu",
nil, hide, menulist_update, prompt_keypressed_callback
)
instance.wibox.visible = true
end