Short: Spawns preconfigured CLIs Author: megacz@usa.com Uploader: megacz usa com Type: util/cli Version: 0.3 Requires: 68000+/os2.04+ Architecture: generic clispawn.rexx-0.3 ------------------ --- Do you remember 'clihandler'? No? Oh ... Anyway, this is something like 'clihandler', however much better. 'clispawn.rexx' is a way of spawning preconfigured CLI window or CLI screen. You may of course adjust config to suit your needs - its a script. You may also like to hack it if you like - hacked/improved versions are welcome. --- NEWS: [12-Oct-2009] 0.3 Added 'PATH' option, that can overrride the default start path. Fixed line parsing in 'EXECUTE'. Fyi, 'mss' is on Aminet under 'megascreenshell'. [18-Jun-2009] 0.2 Removed 'screenshell' support, and thus code responsible for grepping in 'screenmode.prefs', and added 'mss' in place. --- NOTES: [*] Requires 68000+, OS 2.04+, RexxMast, rx, mss, newcli, alias, run, noreq [*] Important, after installing edit 'clispawn.rexx' and adjust configuration variables to fit your needs. Things you should change in the first place: windowposition = "10x10" - where should your windows appear on the screen by default? windowbordersize = "23x16" - manually summed (Bottom + Top)x(Left + Right) window borders, if you use some window enhancers or fonts different than mine then you must provide your values in order to achieve true window work space computed according to (Columns)x(Rows). windowworkspacepx = "423x216" - default window workspace in pixels, this will be used when computing workspace from character size will fail. defaultprompt = "%n.[$vardefaultsysnme]%s> " - what should be your prompt, in my system i use a variable that shows name of my system, but you may configure it to show currently logged in user if you like. [*] 'clispawn.rexx' was designed for use with hotkey handlers mainly, but you may use it like 'newcli' from 'Execute Command' or some other shell. [*] 'clispawn.rexx' does not display help screen and does not report errors, if you want to check what has failed then dont 'RUN' it. [*] There is 'fkey' included with keys preconfigured, see 'fkey.info' to get familiar key combinations. --- HELP: DEV/K - Device you wish to use, like KCON: or VNC: WINPOS/K - New window position, template: XxY, 10x10 BORDER/K - New summed border values, t.: XxY, 23x16 CSPACE/K - Workspace in chars, t.: XxY, 80x25 PSPACE/K - Workspace in pixels, t.: XyY, 423x216 MODEID/K - New ModeID for 'mss'(see its docs!) FROM/K - New startup file, like 's:shell-startup' PUB/K - New public screen, like 'MyScreen' KFONT/K - Font for 'newcli' with 'KCON:', like '6pack/8' SFONT/K - Font for 'mss', like 'courier/15' EXECUTE/K - Run command(s) in shell, 'ECHOs"one"nECHOs"two"' This option accepts quoted or unquoted multiline strings. There can be quotes inside the quotes for example: 'clispawn execute "echo "me is horny!""'. Additionally these char repl. are available: 's' - space, 'n' - lf, so you can for instace: 'clispawn execute "showconfignwait 3nendcli"' FLAGS/K - Handler related flags, like '/WAIT/AUTO' PATH/K - Default start path, like 'RAM:' or current directory when '""' specified NOASCII/S - Dont print any ASCII Art stuff SCREEN/S - Prefer 'mss' instead of 'newcli' MONO/S - 1 bit screen(for use with 'mss') MENUFY/S - Allow windows to be menufied POP/S - 'Workbench' to front on 'newcli' spawn CURRENT/S - Open 'newcli' window on the current screen INACTIVE/S - Make 'newcli' window inactive, useful in conjuntion with 'EXECUTE/K'. BLACK/S - Background is black and foreground white. --- INSTALLATION: ; install in SYS: if you dont know a better place cd clispawn-0.2 makedir sys:clispawn copy all #? sys:clispawn/ ; add to 'startup-sequence' before any hotkey handler ; and before 'loadwb' assign clispawn: sys:clispawn alias clispawn "RUN NIL: *`rx clispawn:clispawn.rexx []*`" run >NIL: clispawn:fkey cx_popup=no --- TIPS: [*] If you use 'toolsdaemon' then you can attach an entry that will allow to start CLI or Workbench program through 'clispawn'. Adding this will do: Menu entry: "clispawn []" (CLI) clispawn execute " []nendcli" flags /wait inactive Now, if you mark some icon and choose that entry from the menu, then output of that proggy will appear in newly spawned CLI. In this example '/WAIT' flag is used which means that window will stay opened after 'ENDCLI', you may want to add 'wait 3' before 'ENDCLI' for example and remove '/WAIT'. [*] You can use 'clispawn' from under the Workbench as well. Suppose you created some 'ARexx' script which outputs to console, but you would like to start it in nice 'CLI' with just a double click. To do so make a file that looks more or less like this: clispawn path "" execute "rx myscript.rexx open=thatfriggindoor.txt" Then, make an icon, set to 'Project' and in the 'Default Tool' field type, the immortal 'iconx'. --- USAGE: ; usage is a simple as typing clispawn ; or for fullscreen clispawn screen --- megacz@usa.com