prompt: Fix 2 deprecation warnings
An oversaw in a previous commit introduced deprecation warnings on the default config.
This commit is contained in:
parent
de121975bf
commit
07f3a178fa
|
@ -20,13 +20,15 @@ local widgetprompt = { mt = {} }
|
||||||
--
|
--
|
||||||
-- @param promptbox The promptbox to run.
|
-- @param promptbox The promptbox to run.
|
||||||
local function run(promptbox)
|
local function run(promptbox)
|
||||||
return prompt.run({ prompt = promptbox.prompt },
|
return prompt.run {
|
||||||
promptbox.widget,
|
prompt = promptbox.prompt,
|
||||||
function (...)
|
textbox = promptbox.widget,
|
||||||
promptbox:spawn_and_handle_error(...)
|
completion_callback = completion.shell,
|
||||||
end,
|
history_path = util.get_cache_dir() .. "/history",
|
||||||
completion.shell,
|
exe_callback = function (...)
|
||||||
util.get_cache_dir() .. "/history")
|
promptbox:spawn_and_handle_error(...)
|
||||||
|
end,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function spawn_and_handle_error(self, ...)
|
local function spawn_and_handle_error(self, ...)
|
||||||
|
|
|
@ -440,15 +440,17 @@ function menubar.show(scr)
|
||||||
menulist_update(nil, scr)
|
menulist_update(nil, scr)
|
||||||
|
|
||||||
local prompt_args = menubar.prompt_args or {}
|
local prompt_args = menubar.prompt_args or {}
|
||||||
prompt_args.prompt = "Run: "
|
|
||||||
awful.prompt.run(prompt_args, instance.prompt.widget,
|
awful.prompt.run(setmetatable({
|
||||||
function() end, -- exe_callback function set to do nothing
|
prompt = "Run: ",
|
||||||
awful.completion.shell, -- completion_callback
|
textbox = instance.prompt.widget,
|
||||||
awful.util.get_cache_dir() .. "/history_menu",
|
completion_callback = awful.completion.shell,
|
||||||
nil,
|
history_path = awful.util.get_cache_dir() .. "/history_menu",
|
||||||
menubar.hide, function(query) menulist_update(query, scr) end,
|
done_callback = menubar.hide,
|
||||||
prompt_keypressed_callback
|
changed_callback = function(query) menulist_update(query, scr) end,
|
||||||
)
|
keypressed_callback = prompt_keypressed_callback
|
||||||
|
}, {__index=prompt_args}))
|
||||||
|
|
||||||
instance.wibox.visible = true
|
instance.wibox.visible = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue