Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > e16883216d0c953daf76a8cb557de090 > files > 1

pdmenu-1.2.69-2mdk.i586.rpm

#!/usr/bin/pdmenu

#Note that the above bang-path isn't required, but it lets you run this
#file directly as a sort of pdmenu script.

#Define the main menu:
menu:main:Main Menu
	# This ties in with Debian's autogenerated Apps menu.
	show:_Debian Menus..::/Debian
	exec:_Change your password:p:passwd
	exec:_Directory listing:display:ls -l
	exec:_Change directory:edit,setenv:echo PWD=~set to?:~
	exec:_Who's online?:truncate:echo "These users are online:";w
	nop
	exit:E_xit

# If you edit this file, you will probably not want to remove the following 
# section, which makes menus of Debian apps available.
#
# What this does is run a simplistic cpp-like program (you could use cpp
# here, but there are side effects that make this undesirable). The cpp clone
# reads in standard input and /var/lib/pdmenu/.pdmenurc_auto, and outputs a
# pdmenurc file tailored for the cirrent display. If X is available, 
# "#define x11" is passed to the cpp clone as part of its stdin. If we are at 
# the linux console, "#define vc" is passed, and "#define text" is always 
# passed, since plain text mode will always work (or pdmenu wouldn't be
# running!).
preproc: \
	if tty|egrep -q "tty[0-9]|vc/[0-9]|console"; then 	\
		args="$args#define vc\n";			\
	fi; 							\
	if [ "$DISPLAY" ]; then					\
		args="$args#define x11\n";			\
	fi; 							\
	if [ -f /var/lib/pdmenu/pdmenurc_auto ] ; then		\
		printf  "#define text\n$args" |			\
			/usr/lib/pdmenu/cpp.pl -		\
				/var/lib/pdmenu/.pdmenurc_auto;	\
	fi