Merge pull request #3069 from aDogCalledSpot/dont_force_defaults

Don't force defaults in menubar
This commit is contained in:
Emmanuel Lepage Vallée 2020-04-23 21:18:47 -07:00 committed by GitHub
commit 29f6387def
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -121,7 +121,7 @@ menubar.left_label = "◀◀"
local list_interspace = theme.xresources.apply_dpi(4) * 3
--- Allows user to specify custom parameters for prompt.run function
-- (like colors).
-- (like colors). This will merge with the default parameters, overriding affected values.
-- @see awful.prompt
menubar.prompt_args = {}
@ -486,9 +486,7 @@ function menubar.show(scr)
current_category = nil
menulist_update(scr)
local prompt_args = menubar.prompt_args or {}
awful.prompt.run(setmetatable({
local default_prompt_args = {
prompt = "Run: ",
textbox = instance.prompt.widget,
completion_callback = awful.completion.shell,
@ -499,7 +497,10 @@ function menubar.show(scr)
menulist_update(scr)
end,
keypressed_callback = prompt_keypressed_callback
}, {__index=prompt_args}))
}
awful.prompt.run(setmetatable(menubar.prompt_args, {__index=default_prompt_args}))
instance.wibox.visible = true
end