Skip to Content

Mandrake pekwm menu method

Alaa's picture

this menu-methods script will generate a pekwm menu structure in /etc/X11/pekwm/menu which can then be included in your ~/.pekwm/menu file using this line

INCLUDE = "/etc/X11/pekwm/menu"

here goes

#!/usr/sbin/install-menu
#
# Generates PekWM menus for all registered applications
# Written by Alaa Abd El Fatah <[email protected]>

!include menu.h
compat="menu-2"

genmenu="menu";
rootprefix="/etc/X11/pekwm/";
userprefix=".pekwm/";

treewalk=(M);

function ltitle()=translate(lang(),title());

supported;
  x11  = nstring(level(),"\t")"Entry = \""esc(ltitle(), "\"")"\" { Actions = \"Exec "esc($command,"\"")"\" }\n";
  wm   = nstring(level(),"\t")"Entry = \""esc(ltitle(), "\"")"\" { Actions = \"RestartOther "esc($command,"\"")"\" }\n";
  text = nstring(level(),"\t")"Entry = \""esc(ltitle(), "\"")"\" { Actions = \"Exec $TERM -T \\\""esc(ltitle(), "\"")"\\\" -e "esc($command,"\"")"\" }\n";
endsupported;

preoutput="\n#Mandrake Menu, Automatically generated. DONT EDIT\n";
postoutput="\n#end of Mandrake Menu";

endmenu=ifelse(basename($section),nstring(level(),"\t")"}\n","");
startmenu=ifelse(basename($section),nstring(level(),"\t")"Submenu = \""esc(ltitle(), "\"")"\" {\n","");


Dr. Radut | book