From 1e6f9f22a5f926feee30e959437c4127b017c35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sindre=20F=C3=B8ring=20Devik?= Date: Mon, 30 Jun 2014 15:08:43 +0200 Subject: [PATCH] FS#1278 - Menubar should check all standard directories Added local desktop directory to list of directories parsed by menubar by using the XDG specification --- lib/menubar/menu_gen.lua.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/menubar/menu_gen.lua.in b/lib/menubar/menu_gen.lua.in index 97212ad82..7089bcca9 100644 --- a/lib/menubar/menu_gen.lua.in +++ b/lib/menubar/menu_gen.lua.in @@ -17,9 +17,14 @@ local menu_gen = {} -- Options section +local data_dir = os.getenv("XDG_DATA_HOME") +if not data_dir then + data_dir = os.getenv("HOME") .. '/.local/share/' +end + --- Specifies all directories where menubar should look for .desktop -- files. The search is not recursive. -menu_gen.all_menu_dirs = { '/usr/share/applications/', '/usr/local/share/applications/' } +menu_gen.all_menu_dirs = { data_dir .. 'applications/', '/usr/share/applications/', '/usr/local/share/applications/' } --- Specify the mapping of .desktop Categories section to the -- categories in the menubar. If "use" flag is set to false then any of