diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 02:13:59 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 02:13:59 +0000 |
commit | a6d58bb6052ac8cb01805a48c4ad2f129126116f (patch) | |
tree | dd867a099fcbb263a8009a9fb22695b87855dad6 /doc/scriptexamples/runmenu/runmenu.kvs | |
download | kvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.tar.gz kvirc-a6d58bb6052ac8cb01805a48c4ad2f129126116f.zip |
Added KDE3 version of kvirc
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1095341 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'doc/scriptexamples/runmenu/runmenu.kvs')
-rw-r--r-- | doc/scriptexamples/runmenu/runmenu.kvs | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/doc/scriptexamples/runmenu/runmenu.kvs b/doc/scriptexamples/runmenu/runmenu.kvs new file mode 100644 index 00000000..dea6a27d --- /dev/null +++ b/doc/scriptexamples/runmenu/runmenu.kvs @@ -0,0 +1,111 @@ +# 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 :) |