name mode size
.Installers 040000
0000-Config 040000
0000-Demos 040000
Helpers 040000
zz-Default Config 040000
.gitignore 100755 109B
LICENSE-AGPL3 100755 34.52kB
README.md 100755 5.9kB
Update apbin copy 100755 259B
termwin 100755 19.25kB
README.md
# Termwin by Apollia - [http://apollia.com](http://apollia.com) Works in Lighthouse 64 Puppy Linux 6.02 Beta 2. [http://astroblahhh.com/blog/puppy-linux/lhpup-org-is-down-but-lighthouse-64-puppy-linux-6-02-beta-2-is-still-available-i-400.shtml#blogtoc](http://astroblahhh.com/blog/puppy-linux/lhpup-org-is-down-but-lighthouse-64-puppy-linux-6-02-beta-2-is-still-available-i-400.shtml#blogtoc) And hopefully other Puppy Linuxes that I haven't yet tried it with. ---- WARNING: The script uses "eval" in various places, and can be used to run any shell command, which could be quite dangerous. ---- The purpose of Termwin is to make it so in Puppy Linux, I can run console scripts with Rox-Filer - either by double-clicking on them, or via a console command such as rox [filepath of script] - and have a terminal window automatically opened, showing that script's output in whatever terminal software I want. I had to add a run action to Rox-Filer (the usual default file manager in Puppy Linux) to make this happen. (One of the included Installer scripts will do that for you automatically.) Also, since Rox-Filer run actions don't get run on files which have Exec permissions, I have to remove Exec permissions on any script I want to launch with Termwin. <br> Years ago, before I became good enough at shell scripting to figure out how to make Termwin, the only way for me to achieve something like the above behavior was to have terminal-window-opening code included with every script I wanted to immediately see the output of. <br>Finally, thanks to Termwin, my scripts can be unburdened from that annoying extra baggage. I'm probably going to use Termwin in my not-yet-finished renovated Puppy Linux Setup Kit. <br> Termwin's installer requires Ramize-Physave. [https://apollia.org/gitlist/Ramize-Physave.git](https://apollia.org/gitlist/Ramize-Physave.git) ---- Changelog: Oct. 14, 2018. A new command line switch: -c, --cloak, --encloak Almost the same thing as an --encape arg, except --encloak args get left out of the ^^ENCAO@^^ array. So, with encloak args, there's no built-in way to add every encloak arg to the command without mentioning each individual encloak arg's ID. Encloak IDs are in this format: ^^CLO1^^, ^^CLO2^^, etc. <br>The -c switch now equates to --cloak instead of --change-working-dir-to. <br>Termwin now announces its own PID. command_runner will also, if it's in Debug Mode. <br>Also tidied up a bit in various ways: * Changed shabang lines in termwin and command_runner to #!/bin/bash instead of #!/bin/sh. * Changed "sh" commands to "bash". * Changed version number to today's date. * Fixed 2 missing "\$" in the help text. * Etc. <br>Oct. 11, 2018. A special new substitution ID: ^^ENCAO@^^ It's necessary because putting "$@" into your Bash command would likely go awry. Use ^^ENCAO@^^ if you want to insert every encaped arg into your command without having to put each individual arg's ID. Each ENCAO@ arg will be encaped, then enclosed in single quotes. (Encao means "encaped and enclosed", and the @ part is named after the $@ array in Bash, which holds arguments.) <br>Also, I changed the positional args, and removed some of them. Now, Termwin can accept any number of encape args via positional args. Used some code from my Bash App Templates to make that possible. [https://apollia.org/gitlist/Apollia-s-Bash-App-Templates.git](https://apollia.org/gitlist/Apollia-s-Bash-App-Templates.git) Arg #1 = --title Arg #2 = --term Arg #3 = --execute-with-substitutions All args beyond Arg #3 = --encape <br>Oct. 7, 2018. I tidied up the source code a bit, and renamed various variables and functions, changing almost everything that said "escape" to "encape". However, substitution IDs are still written like this: ^^ESC1^^ ^^ESC2^^ I don't plan to change that, because that would break existing Termwin command lines which use the original IDs. <br>Oct. 3, 2018. A new command line switch, which is just a synonym of --escape: --encape Explained here: [https://apollia.org/gitlist/Apollia-Jargon.git](https://apollia.org/gitlist/Apollia-Jargon.git) <br>May 13, 2018. A new command line switch: -c, --change-working-dir-to, --cd-to, --change-dir-to [folderpath] ...which will make Termwin go to that folder before running the commands you provided in the args --execute or --execute-with-substitutions. It was aleady possible to change the working dir just by preceding your command(s) inside the arg --execute(-with-substitutions) with cd [folderpath]; But --change-working-dir-to [folderpath] makes things tidier and more readable, I think. <br> And there are 2 new synonyms for --dontwaitfornewline: --do-not-wait-for-newline --dont-wait-for-newline <br>May 4, 2018. Made it possible to install Termwin using APSK Apphoard Manager. [https://apollia.org/gitlist/APSK-Apphoard-Manager.git](https://apollia.org/gitlist/APSK-Apphoard-Manager.git) Also improved the original installer scripts, but still have yet to test them thoroughly. Perhaps I ought to make the original installer independent of Ramize-Physave as well as APSK Apphoard Manager, so Termwin could be installed without installing anything else first. <br>Feb. 9, 2018. Renamed termwin to Termwin. But, for ease of typing, the "termwin" script name (and command) will remain all lowercase. <br>Feb. 7, 2018. Now Termwin can use Roxterm. [https://apollia.org/gitlist/Roxterm.git](https://apollia.org/gitlist/Roxterm.git) Changed an installer script, since I renamed something in Ramize-Physave. [https://apollia.org/gitlist/Ramize-Physave.git](https://apollia.org/gitlist/Ramize-Physave.git) Documented a command line option I forgot to document before: --dontwaitfornewline or -d, which makes it so the terminal window just closes instead of waiting for you to press Enter after the command is done.