From 2cd1ad092bfe9132c915789d617a2325b3eb6d23 Mon Sep 17 00:00:00 2001 From: HoNamDuong Date: Wed, 7 Feb 2024 00:20:12 +0700 Subject: [PATCH] menubar.menu_gen: add category `other` --- lib/menubar/menu_gen.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/menubar/menu_gen.lua b/lib/menubar/menu_gen.lua index 193eef1c51..7d170eaa1e 100644 --- a/lib/menubar/menu_gen.lua +++ b/lib/menubar/menu_gen.lua @@ -54,7 +54,9 @@ menu_gen.all_categories = { tools = { app_type = "System", name = "System Tools", icon_name = "applications-system", use = true }, utility = { app_type = "Utility", name = "Accessories", - icon_name = "applications-accessories", use = true } + icon_name = "applications-accessories", use = true }, + other = { app_type = nil, name = "Other", + icon_name = "applications-other", use = true } } -- Find icons for category entries. @@ -101,6 +103,7 @@ function menu_gen.generate(callback) -- Check if the program falls into at least one of the -- usable categories. Set target_category to be the id -- of the first category it finds. + -- Or without category. if entry.categories then for _, category in pairs(entry.categories) do local cat_key, cat_use = @@ -110,6 +113,8 @@ function menu_gen.generate(callback) break end end + else + target_category = "other" end local name = utils.rtrim(entry.Name) or ""