From 788d8fec3327816ec87ba51168c2f022317edfed Mon Sep 17 00:00:00 2001 From: Ari Breitkreuz Date: Tue, 21 Apr 2020 16:45:40 +0200 Subject: [PATCH 1/3] Don't force defaults in menubar --- lib/menubar/init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/menubar/init.lua b/lib/menubar/init.lua index 34877d457..d5860d2b6 100644 --- a/lib/menubar/init.lua +++ b/lib/menubar/init.lua @@ -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 From 138e37576d25a2a4b5345baa6ef9782198428d60 Mon Sep 17 00:00:00 2001 From: Ari Breitkreuz Date: Wed, 22 Apr 2020 13:05:19 +0200 Subject: [PATCH 2/3] Add note that prompt_args will override defaults --- lib/menubar/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/menubar/init.lua b/lib/menubar/init.lua index d5860d2b6..49c67faaa 100644 --- a/lib/menubar/init.lua +++ b/lib/menubar/init.lua @@ -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). These will override default parameters. -- @see awful.prompt menubar.prompt_args = {} From 6c7a5a507309bdb8a358646315725e1c6591d42a Mon Sep 17 00:00:00 2001 From: Yauhen Kirylau Date: Wed, 22 Apr 2020 22:03:28 +0200 Subject: [PATCH 3/3] Update lib/menubar/init.lua Co-Authored-By: Ari --- lib/menubar/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/menubar/init.lua b/lib/menubar/init.lua index 49c67faaa..64d55d659 100644 --- a/lib/menubar/init.lua +++ b/lib/menubar/init.lua @@ -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). These will override default parameters. +-- (like colors). This will merge with the default parameters, overriding affected values. -- @see awful.prompt menubar.prompt_args = {}