You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
1.6 KiB
112 lines
1.6 KiB
15 years ago
|
# This simple script adds a sample "run external program" popup
|
||
|
# to your menubar
|
||
|
# This is just a sample popup... you will probably
|
||
|
# want to add/remove entries here
|
||
|
# This will also work mainly on unix... windows has not so much
|
||
|
# proggies to be run as example
|
||
|
|
||
|
|
||
|
# Define the popup with run entries...
|
||
|
# You prolly will change a lot here :)
|
||
|
|
||
|
defpopup(runmenu)
|
||
|
{
|
||
|
popup(Terminal,138)
|
||
|
{
|
||
|
item(XTerm,25) ($system.ostype == unix)
|
||
|
{
|
||
|
run xterm
|
||
|
}
|
||
|
|
||
|
item(Konsole,151) ($system.ostype == unix)
|
||
|
{
|
||
|
run konsole
|
||
|
}
|
||
|
|
||
|
item(ETerm,25) ($system.ostype == unix)
|
||
|
{
|
||
|
run eterm
|
||
|
}
|
||
|
}
|
||
|
|
||
|
popup(Browser,172)
|
||
|
{
|
||
|
item(konqueror,135) ($system.ostype == unix)
|
||
|
{
|
||
|
run konqueror
|
||
|
}
|
||
|
|
||
|
item(netscape,164)
|
||
|
{
|
||
|
if($system.ostype == unix)run kvi_run_netscape
|
||
|
else run netscape.exe
|
||
|
}
|
||
|
}
|
||
|
|
||
|
popup(Multimedia,177)
|
||
|
{
|
||
|
item(xmms)
|
||
|
{
|
||
|
run xmms
|
||
|
}
|
||
|
item(mplayer)
|
||
|
{
|
||
|
run mplayer
|
||
|
}
|
||
|
item(kscd)
|
||
|
{
|
||
|
run kscd
|
||
|
}
|
||
|
}
|
||
|
|
||
|
popup(Utils)
|
||
|
{
|
||
|
item(xcalc)
|
||
|
{
|
||
|
run xcalc;
|
||
|
}
|
||
|
item(kcalc)
|
||
|
{
|
||
|
run kcalc;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
separator;
|
||
|
|
||
|
# Let's allow to run an user specified command
|
||
|
|
||
|
item(Run...,183)
|
||
|
{
|
||
|
dialog.textinput(Run,<center>Please enter the command name</center>,Ok,Cancel)
|
||
|
{
|
||
|
if($0 == 0 && $1)run $1
|
||
|
}
|
||
|
}
|
||
|
|
||
|
separator;
|
||
|
|
||
|
# This is an interesting item
|
||
|
# It allows this script to be uninstalled :)
|
||
|
|
||
|
popup(Uninstall,110)
|
||
|
{
|
||
|
item(Uninstall this menu,110)
|
||
|
{
|
||
|
timer -s (runmenu_uninstall,0){ defpopup(runmenu){}; }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# add it to the menubar of each new frame
|
||
|
|
||
|
event(OnFrameWindowCreated,runmenu)
|
||
|
{
|
||
|
setmenu -i=3 "&Run" runmenu
|
||
|
}
|
||
|
|
||
|
# set it also just now, in the current frame
|
||
|
|
||
|
setmenu -i=3 "&Run" runmenu
|
||
|
|
||
|
# done :)
|