1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#!/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.
#Set a pleasing color scheme.
color:desktop:white:blue
color:title:yellow:red
color:base:yellow:red
#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 \
echo -e "#define text\n$args" | \
/usr/lib/pdmenu/cpp.pl - \
/var/lib/pdmenu/.pdmenurc_auto; \
fi
|