mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
menubar: add trailing slash with $XDG_DATA_HOME (#1631)
The $XDG_DATA_HOME environment variable may not necessarily end in a slash, so insert it when generating the list of all menu dirs to make sure the directory can be found.
This commit is contained in:
parent
399bd8543a
commit
862bfbf795
1 changed files with 2 additions and 2 deletions
|
@ -20,12 +20,12 @@ local menu_gen = {}
|
||||||
|
|
||||||
local data_dir = os.getenv("XDG_DATA_HOME")
|
local data_dir = os.getenv("XDG_DATA_HOME")
|
||||||
if not data_dir then
|
if not data_dir then
|
||||||
data_dir = os.getenv("HOME") .. '/.local/share/'
|
data_dir = os.getenv("HOME") .. '/.local/share'
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Specifies all directories where menubar should look for .desktop
|
--- Specifies all directories where menubar should look for .desktop
|
||||||
-- files. The search is recursive.
|
-- files. The search is recursive.
|
||||||
menu_gen.all_menu_dirs = { data_dir .. 'applications/', '/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
|
--- Specify the mapping of .desktop Categories section to the
|
||||||
-- categories in the menubar. If "use" flag is set to false then any of
|
-- categories in the menubar. If "use" flag is set to false then any of
|
||||||
|
|
Loading…
Reference in a new issue