diff --git a/xdg-menu b/xdg-menu index f551adb..72d5ad8 100644 --- a/xdg-menu +++ b/xdg-menu @@ -31,7 +31,8 @@ def walk_menu(entry): elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded: print ' ' % \ escape(entry.get_name().replace('"', '')) - command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', entry.get_exec()) + command = re.sub(' -caption "%c"| -caption %c', ' -caption "%s"' % entry.get_name(), entry.get_exec()) + command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', command) if entry.launch_in_terminal: command = 'xterm -title "%s" -e %s' % \ (entry.get_name(), command)