From d268dba0758b34a3dbb0658080d91508e05b2f52 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Tue, 20 Jan 2015 13:28:46 -0500 Subject: [PATCH] menubar: handle nil Name in .desktop files --- lib/menubar/utils.lua.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/menubar/utils.lua.in b/lib/menubar/utils.lua.in index c23e4807..8cd0b169 100644 --- a/lib/menubar/utils.lua.in +++ b/lib/menubar/utils.lua.in @@ -177,6 +177,9 @@ function utils.parse(file) if program.Exec then -- Substitute Exec special codes as specified in -- http://standards.freedesktop.org/desktop-entry-spec/1.1/ar01s06.html + if program.Name == nil then + program.Name = '['.. file:match("([^/]+)%.desktop$") ..']' + end local cmdline = program.Exec:gsub('%%c', program.Name) cmdline = cmdline:gsub('%%[fuFU]', '') cmdline = cmdline:gsub('%%k', program.file)