line 365 from github ver 0.4 xdgmenumaker/src/xdgmenumaker, insert:
Code: Select all
def pekwmmenu():
global seticon
global submenu
print '#!/usr/bin/ruby'
print '# inclusive app menu for pekwm menu or add to existing menu file:'
print '# Entry = "" { Actions = "Dynamic /usr/bin/xdgmenumaker -i -f pekwm" }'
if submenu is True:
# spacing = ' '
spacing = ' '
if seticon == True:
app_icon = icon_full_path(applications_icon)
print 'Submenu = "'+applications+'" { Icon = "'+app_icon+'"'
else:
print 'Submenu = "'+applications+'" {'
else:
spacing = ''
for i in menu():
category = i[0]
cat_icon = category_icon(category)
cat_icon = icon_full_path(cat_icon)
if seticon is True and cat_icon is not None:
print spacing+'Submenu = " '+category+'" { Icon = "'+cat_icon+'"'
else:
print spacing+'Submenu = "'+category+'" {'
for j in i[1]:
name = j[0]
icon = j[1]
command = j[2]
if seticon is True and icon is not None:
print spacing+spacing+'Entry = " '+name+'" { Icon = "'+icon+'"; Actions = "Exec '+command+'" }'
else:
print spacing+' Entry = "'+name+'" { Actions = "Exec '+command+'" }'
print spacing+'}'
if submenu is True:
print '}'
Code: Select all
elif desktop == "pekwm":
pekwmmenu()
I have mainly copied this code from an old pekwm menu maker from Fedora and/or somwhere at googlecode. I use this in my pekwm desktop.
Whoever uses pekwm (similarly with fluxbox) probably knows this produces only the applications submenu since those WMs have other functions in their main menus (themes/wallpaper selectors, logout and window management items). There is no all-in-one solution for pekwm menus anywhere.
So, the usual usage could be to either:
enter this item into ~/.pekwm/menu:
INCLUDE = "/home/your_username/.pekwm/appsmenu"
than:
/usr/bin/xdgmenumaker -i -f pekwm > ~/.pekwm/appsmenu
(and repeat this step anytime you install something new)
or:
add an entry to ~/.pekwm/appsmenu:
Entry = "" { Actions = "Dynamic /usr/bin/xdgmenumaker -i -f pekwm" }
to make it dynamic at expense of running it everytime you invoke the menu.
I hope Gapan finds this usable. I apologize for sugesting the code this way as I don't know how to attach the diff nor I'm at github.