Menubar: Expose the wm_name attribute
This commit makes it possible to change the wm_name attribute, which means that programs can be shown/hidden according to the wishes of the user. Possible usecase: A user is using Gnome and Awesome together, but sinc wm_name by default is awesome, all the apps shipped with GNOME DE are hidden by default. Changing wm_name attribute in this case would solve the issue. Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
0c6fd178ed
commit
633e8f2f06
|
@ -31,7 +31,7 @@ utils.terminal = 'xterm'
|
|||
local default_icon = nil
|
||||
|
||||
-- Name of the WM for the OnlyShownIn entry in the .desktop file.
|
||||
local wm_name = "awesome"
|
||||
utils.wm_name = "awesome"
|
||||
|
||||
-- Private section
|
||||
|
||||
|
@ -136,8 +136,8 @@ function utils.parse(file)
|
|||
end
|
||||
|
||||
-- Only show the program if there is no OnlyShowIn attribute
|
||||
-- or if it's equal to 'awesome'
|
||||
if program.OnlyShowIn ~= nil and program.OnlyShowIn ~= wm_name then
|
||||
-- or if it's equal to utils.wm_name
|
||||
if program.OnlyShowIn ~= nil and program.OnlyShowIn ~= utils.wm_name then
|
||||
program.show = false
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue