here's a general use version of the script i've been using (piecemeal) to configure my android devices to use the tnux text editor utilities (it's not a typo--text editors, nano, micro (u), tmu(x) terminal multiplexer; sometimes the little red line's more annoying than others) and be more useable in general. the .. business moves up directories (rather than cd /path to where you were), but the everything else should be fairly heavily commented (it started out as Androido but is now tnux-a):
#!/bin/sh
#androido/tnux-a. tnux0.pet as a script to configure android devices to use binder like batches of text editor files launched in tmux or terminal
#text editors used are nano, mc edit, and micro; terminal app and tmux req.
#android version gets rid of calls to specific consoles since you have to be in the terminal to use in the first place
#i perhaps mistakenly use terminal and console interchangeably.
echo $'#!/bin/sh
notesn
notesm
notesmcx
#seems that in android/termux/tmux you need to call bash to run scripts not in the path. i.e. bash ./ thishere.sh.
#try changing permissions or preceeding the call with bash if things aren\'t working as expected. this script is the
#android device version of tnux.0 and the other On4n/0m4u grids of text editor notebooks in tmux (nano, micro, and now mc edit).
# call with notesn, note (all at once), notesmcx, or notesm (there\'s no lpx conflict but i named things the same way in the android version anyway). in testing i used puppy to make the folders i tried out on the android boxes, phone, and kindle, but this newest version can make the folders in the android device itself (in theory--i haven\'t actually tested it yet--at worse it\'ll just fail and you can make it in linux and access them in the networked android folder)
#some of the bits that are commented probably should be uncommented out and their versions taken off bash.bashrc, but calling cd /path scripts wasnt working on the kindle originally (i think a bash update fixed that and opening the asterisk weirdness (opening a file named * rather than all the files in a directory). if not, i\'ll post the longer version at some later time. (all files listed and you don\'t get auto inclusion of whatever you put in that folder or syncing conflicts, etc--it\'s not preferable).
' > /data/data/com.termux/files/usr/bin/applets/note
chmod 755 /data/data/com.termux/files/usr/bin/applets/note
###
#above refers to scripts not yet included, but first i want to get the bashrc stuff out of the way (mostly stuff to make navigation and editing of configuration files easier):
#back up bash profile and add some stuff to it:
cp -f /data/data/com.termux/files/usr/etc/bash.bashrc /data/data/com.termux/files/usr/etc/bash.bashrc-bk
echo $'
alias .....=\'cd ../../../../\'
alias ....=\'cd ../../../\'
alias ...=\'cd ../../\'
alias ..=\'cd ..\'
alias ll=\'ls -sa\'
alias ls=\'ls --color=auto\'
#(can\'t find the specific original source, but) the above bit is pretty common--hop up the directory tree and make ls a little more user friendly. more navigation shorts:
alias usr=\'cd /data/data/com.termux/files/usr/\'
alias config=\'cd /data/data/com.termux/files/home/.config/\'
alias etc=\'cd /data/data/com.termux/files/usr/etc/\'
alias home=\'cd /data/data/com.termux/files/home/\'
alias home2=\'cd /storage/emulated/0/CUS/\'
alias sto=\'cd /storage/emulated/0/\'
#these next two are uncommented but you should either swap in your dropbox stuff and card details or comment them out:
alias cardb=\'cd /storage/emulated/0/Android/data/com.dropbox.android/files/[]/\'
alias card=\'cd /storage/[somenumber]\'
path1=\'cd /data/data/com.termux/files/usr/bin/\'
path2=\'cd /data/data/com.termux/files/usr/bin/applets/\'
#you could add a path and do other bash tricks, many or all of which may be better than having to remember to not update the bash profile when you update bash (the reason some of the individual scripts this script makes duplicate some of these functions--you may forget and need to get back in here (or you can just rerun this bit).
alias microno=\'nano /data/data/com.termux/files/usr/etc/nanorc /data/data/com.termux/files/home/.config/micro/settings.json /data/data/com.termux/files/usr/etc/bash.bashrc\'
alias microc=\'micro /data/data/com.termux/files/usr/etc/nanorc /data/data/com.termux/files/home/.config/micro/settings.json /data/data/com.termux/files/usr/etc/bash.bashrc\'
#^main configuration files i seem to find myself tweaking, opened in your choice of nano or micro.
#i put cd ../[sto]/0n4n (etc) on the bash profile as well for easy access, but i no longer think the cd /path scripts would be a problem--i may have forgotten to add some authorization package first time around.
' >> /data/data/com.termux/files/usr/etc/bash.bashrc
#sto and home2 (swap out CUS or the rest of the path) are set for where android seems to prefer you store your stuff.
#
#the rest of my original config script (assumes you made the text editor batch launch folders already and placed them ..storage/../CUS:
#
#
#swap out the CUS for the folder if using sto; swap out whole path if using some other location
#(though you could just ignore the defaults and use the note(s- n,m,mcx) scripts)
# for easy filling of the tmux grids with text editor/document batches:
echo $'#!/bin/sh
nano /storage/emulated/0/CUS/0n4n/1/*
' > /data/data/com.termux/files/usr/bin/applets/na1
chmod 755 /data/data/com.termux/files/usr/bin/applets/na1
echo $'#!/bin/sh
nano /storage/emulated/0/CUS/0n4n/2/*
' > /data/data/com.termux/files/usr/bin/applets/na2
chmod 755 /data/data/com.termux/files/usr/bin/applets/na2
echo $'#!/bin/sh
nano /storage/emulated/0/CUS/0n4n/a/*
' > /data/data/com.termux/files/usr/bin/applets/naa
chmod 755 /data/data/com.termux/files/usr/bin/applets/naa
echo $'#!/bin/sh
nano /storage/emulated/0/CUS/0n4n/b/*
' > /data/data/com.termux/files/usr/bin/applets/nab
chmod 755 /data/data/com.termux/files/usr/bin/applets/nab
echo $'#!/bin/sh
nano /storage/emulated/0/CUS/0n4n/c/*
' > /data/data/com.termux/files/usr/bin/applets/nac
chmod 755 /data/data/com.termux/files/usr/bin/applets/nac
echo $'#!/bin/sh
micro /storage/emulated/0/CUS/0m4u/1/*
' > /data/data/com.termux/files/usr/bin/applets/mi1
chmod 755 /data/data/com.termux/files/usr/bin/applets/mi1
echo $'#!/bin/sh
micro /storage/emulated/0/CUS/0m4u/2/*
' > /data/data/com.termux/files/usr/bin/applets/mi2
chmod 755 /data/data/com.termux/files/usr/bin/applets/mi2
echo $'#!/bin/sh
micro /storage/emulated/0/CUS/0m4u/a/*
' > /data/data/com.termux/files/usr/bin/applets/mia
chmod 755 /data/data/com.termux/files/usr/bin/applets/mia
echo $'#!/bin/sh
micro /storage/emulated/0/CUS/0m4u/b/*
' > /data/data/com.termux/files/usr/bin/applets/mib
chmod 755 /data/data/com.termux/files/usr/bin/applets/mib
echo $'#!/bin/sh
micro /storage/emulated/0/CUS/0m4u/c/*
' > /data/data/com.termux/files/usr/bin/applets/mic
chmod 755 /data/data/com.termux/files/usr/bin/applets/mic
echo $'#!/bin/sh
/storage/emulated/0/CUS/0n4n/allcat
/storage/emulated/0/CUS/0n4n/allcatted
/storage/emulated/0/CUS/0n4n/cat4n
/storage/emulated/0/CUS/0n4n/cat4n0
nano /storage/emulated/0/CUS/0n4n/*.txt
' > /data/data/com.termux/files/usr/bin/applets/natxt
chmod 755 /data/data/com.termux/files/usr/bin/applets/natxt
echo $'#!/bin/sh
/storage/emulated/0/CUS/0n4n/allcat
/storage/emulated/0/CUS/0n4n/allcatted
/storage/emulated/0/CUS/0n4n/cat4n
/storage/emulated/0/CUS/0n4n/cat4n0
micro /storage/emulated/0/CUS/0n4n/*.txt
' > /data/data/com.termux/files/usr/bin/applets/mnatxt
chmod 755 /data/data/com.termux/files/usr/bin/applets/mnatxt
echo $'#!/bin/sh
/storage/emulated/0/CUS/0m4u/allcat
/storage/emulated/0/CUS/0m4u/allcatted
/storage/emulated/0/CUS/0m4u/cat4n
/storage/emulated/0/CUS/0m4u/cat4n0
micro /storage/emulated/0/CUS/0m4u/*.txt
' > /data/data/com.termux/files/usr/bin/applets/mitxt
chmod 755 /data/data/com.termux/files/usr/bin/applets/mitxt
echo $'#!/bin/sh
/storage/emulated/0/CUS/0m4u/allcat
/storage/emulated/0/CUS/0m4u/allcatted
/storage/emulated/0/CUS/0m4u/cat4n
/storage/emulated/0/CUS/0m4u/cat4n0
nano /storage/emulated/0/CUS/0m4u/*.txt
' > /data/data/com.termux/files/usr/bin/applets/nmitxt
chmod 755 /data/data/com.termux/files/usr/bin/applets/nmitxt
echo $'#!/bin/sh
tmux new-session \; send-keys \'naa\' C-m \; split-window -v \; send-keys \'nab\' C-m \; split-window -h \; send-keys \'nac\' C-m \; split-window -h \; send-keys \'na1\' C-m \; split-window -h \; send-keys \'na2\' C-m \; split-window -v \; send-keys \'natxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6ny2
chmod 755 /data/data/com.termux/files/usr/bin/applets/6ny2
echo $'#!/bin/sh
tmux new-session \; send-keys \'mia\' C-m \; split-window -v \; send-keys \'mib\' C-m \; split-window -h \; send-keys \'mic\' C-m \; split-window -h \; send-keys \'mi1\' C-m \; split-window -h \; send-keys \'mi2\' C-m \; split-window -v \; send-keys \'mitxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6my2
chmod 755 /data/data/com.termux/files/usr/bin/applets/6my2
echo $'#!/bin/sh
tmux new-session \; send-keys \'naa\' C-m \; split-window -v \; send-keys \'nab\' C-m \; split-window -h \; send-keys \'nac\' C-m \; split-window -h \; send-keys \'na1\' C-m \; split-window -h \; send-keys \'na2\' C-m \; split-window -v \; send-keys \'mnatxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6nCUS
chmod 755 /data/data/com.termux/files/usr/bin/applets/6nCUS
echo $'#!/bin/sh
tmux new-session \; send-keys \'mia\' C-m \; split-window -v \; send-keys \'mib\' C-m \; split-window -h \; send-keys \'mic\' C-m \; split-window -h \; send-keys \'mi1\' C-m \; split-window -h \; send-keys \'mi2\' C-m \; split-window -v \; send-keys \'nmitxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6mCUS
chmod 755 /data/data/com.termux/files/usr/bin/applets/6mCUS
#--------------6-------------------------
echo $'#!/bin/sh
tmux new-session \; send-keys \'naa\' C-m \; split-window -v \; send-keys \'nab\' C-m \; split-window -h \; send-keys \'nac\' C-m \; split-window -h \; send-keys \'na1\' C-m \; split-window -h \; send-keys \'na2\' C-m \; split-window -v \; send-keys \'natxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6n
chmod 755 /data/data/com.termux/files/usr/bin/applets/6n
echo $'#!/bin/sh
tmux new-session \; send-keys \'mia\' C-m \; split-window -v \; send-keys \'mib\' C-m \; split-window -h \; send-keys \'mic\' C-m \; split-window -h \; send-keys \'mi1\' C-m \; split-window -h \; send-keys \'mi2\' C-m \; split-window -v \; send-keys \'mitxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6m
chmod 755 /data/data/com.termux/files/usr/bin/applets/6m
#---------------4-------------------------
echo $'#!/bin/sh
tmux new-session \; send-keys \'naa\' C-m \; split-window -v \; send-keys \'nab\' C-m \; split-window -h \; send-keys \'nac\' C-m \; split-window -h \; send-keys \'na1\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/4n
chmod 755 /data/data/com.termux/files/usr/bin/applets/4n
echo $'#!/bin/sh
tmux new-session \; send-keys \'mia\' C-m \; split-window -v \; send-keys \'mib\' C-m \; split-window -h \; send-keys \'mic\' C-m \; split-window -h \; send-keys \'mi1\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/4m
chmod 755 /data/data/com.termux/files/usr/bin/applets/4m
#---------------2-------------------------
echo $'#!/bin/sh
tmux new-session \; send-keys \'na2\' C-m \; split-window -v \; send-keys \'natxt\' C-m \; attach
' > /data/data/com.termux/files/usr/bin/applets/2n
chmod 755 /data/data/com.termux/files/usr/bin/applets/2n
echo $'#!/bin/sh
tmux new-session \; send-keys \'mi2\' C-m \; split-window -v \; send-keys \'mitxt\' C-m \; attach
' > /data/data/com.termux/files/usr/bin/applets/2m
chmod 755 /data/data/com.termux/files/usr/bin/applets/2m
echo $'#!/bin/sh
tmux kill-server
#To close a specific session, use tmux list-sessions to identify the session you want to kill, and then use tmux kill-session -t targetSession to kill that specific session.
' > /data/data/com.termux/files/usr/bin/applets/kil
chmod 755 /data/data/com.termux/files/usr/bin/applets/kil
echo $'#!/bin/sh
tmux kill-session -a
' > /data/data/com.termux/files/usr/bin/applets/kila
chmod 755 /data/data/com.termux/files/usr/bin/applets/kila
#
echo $'#!/bin/sh
tmux new-session \; send-keys \'naa\' C-m \; split-window -v \; send-keys \'nab\' C-m \; split-window -h \; send-keys \'nac\' C-m \; split-window -h \; send-keys \'na1\' C-m \; split-window -h \; send-keys \'na2\' C-m \; split-window -v \; send-keys \'mnatxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6nm
chmod 755 /data/data/com.termux/files/usr/bin/applets/6nm
echo $'#!/bin/sh
tmux new-session \; send-keys \'mia\' C-m \; split-window -v \; send-keys \'mib\' C-m \; split-window -h \; send-keys \'mic\' C-m \; split-window -h \; send-keys \'mi1\' C-m \; split-window -h \; send-keys \'mi2\' C-m \; split-window -v \; send-keys \'nmitxt\' C-m \; select-layout tiled \; attach
' > /data/data/com.termux/files/usr/bin/applets/6mn
chmod 755 /data/data/com.termux/files/usr/bin/applets/6mn
#
#presets/quick calls have no mcedit version, but you can navigate to the 0mce folder to batch launch those versions
echo $'#!/bin/sh
micro /data/data/com.termux/files/usr/etc/nanorc /data/data/com.termux/files/home/.config/micro/settings.json /data/data/com.termux/files/usr/etc/bash.bashrc
' > /data/data/com.termux/files/usr/bin/applets/bashm
chmod 755 /data/data/com.termux/files/usr/bin/applets/bashm
echo $'#!/bin/sh
nano /data/data/com.termux/files/usr/etc/nanorc /data/data/com.termux/files/home/.config/micro/settings.json /data/data/com.termux/files/usr/etc/bash.bashrc
' > /data/data/com.termux/files/usr/bin/applets/bashn
chmod 755 /data/data/com.termux/files/usr/bin/applets/bashn
#end of original file. here's the bit that makes the folders and tmux grids from the terminal (and which will attempt to run them in the ../CUS/.. folder--do a search and replace before running this script):
echo $'
#!/bin/sh
#swap rxvt for terminal of your choice
#(search and replace) micro/nano for text editor of your choice
mkdir -p ./0n4n/a/
mkdir -p ./0n4n/b/
mkdir -p ./0n4n/c/
mkdir -p ./0n4n/1/
mkdir -p ./0n4n/2/
touch ./0n4n/b/00{1..10}
touch ./0n4n/a/0{1..10}
touch ./0n4n/1/{a..z}
touch ./0n4n/2/a{a..z}
touch ./0n4n/c/{1..10}
echo $\'#!/bin/sh
#cat4n
#no overwrite by incoming/running tabs
cat ./a/* >> ./4nal.txt
cat ./b/* >> ./4nbl.txt
cat ./1/* >> ./4n1l.txt
cat ./2/* >> ./4n2l.txt
cat ./c/* >> ./4ncl.txt
\' > ./0n4n/cat4n
chmod 755 ./0n4n/cat4n
echo $\'#!/bin/sh
#cat4n0
#incoming 0verwrites contents
cat ./a/* > ./4na.txt
cat ./b/* > ./4nb.txt
cat ./1/* > ./4n1.txt
cat ./2/* > ./4n2.txt
cat ./c/* > ./4nc.txt
\' > ./0n4n/cat4n0
chmod 755 ./0n4n/cat4n0
echo $\'#!/bin/sh
cat ./a/* > ./4na.txt
cat ./b/* > ./4nb.txt
cat ./1/* > ./4n1.txt
cat ./2/* > ./4n2.txt
cat ./c/* > ./4nc.txt
cat 4n* > ./4cat.txt
\' > ./0n4n/allcat
chmod 755 ./0n4n/allcat
echo $\'#!/bin/sh
cat ./a/* >> ./4naa.txt
cat ./b/* >> ./4nba.txt
cat ./1/* >> ./4n1a.txt
cat ./2/* >> ./4n2a.txt
cat ./c/* >> ./4nca.txt
cat 4n* >> ./4cata.txt
\' >> ./0n4n/allcatted
chmod 755 ./0n4n/allcatted
echo $\'#!/bin/sh
nano ./1/*
\' > ./0n4n/nan1
chmod 755 ./0n4n/nan1
echo $\'#!/bin/sh
nano ./2/*
\' > ./0n4n/nan2
chmod 755 ./0n4n/nan2
echo $\'#!/bin/sh
nano ./a/*
\' > ./0n4n/nana
chmod 755 ./0n4n/nana
echo $\'#!/bin/sh
nano ./b/*
\' > ./0n4n/nanb
chmod 755 ./0n4n/nanb
echo $\'#!/bin/sh
nano ./c/*
\' > ./0n4n/nanc
chmod 755 ./0n4n/nanc
echo $\'#!/bin/sh
#cd ./0n4n/
./allcat
./allcatted
./cat4n
./cat4n0
nano ./*.txt
\' > ./0n4n/nantxt
chmod 755 ./0n4n/nantxt
echo $\'#!/bin/sh
tmux new-session \\; send-keys \\\'nano ./a/*\\\' C-m \\; split-window -v \\; send-keys \\\'nano ./b/*\\\' C-m \\; split-window -h \\; send-keys \\\'nano ./c/*\\\' C-m \\; split-window -h \\; send-keys \\\'nano ./1/*\\\' C-m \\; split-window -h \\; send-keys \\\'nano ./2/*\\\' C-m \\; split-window -v \\; send-keys \\\'./nantxt\\\' C-m \\; select-layout tiled \\; attach
\' > ./0n4n/6n1r
chmod 755 ./0n4n/6n1r
#if not symlinking back, replace the dot with the rest of your real path to make launcher codes or terminal calls for them. for a desktop file you could do the same or just open the folder in your file manager and click on individual or group launch for the subfolders.
' > /data/data/com.termux/files/usr/bin/applets/notesn
chmod 755 /data/data/com.termux/files/usr/bin/applets/notesn
echo $'
#!/bin/sh
#nano batches (0n4n) still set for rxvt
#micro batches (0m4u) now set for sakura
#tmux 6grid of text editor banks as part of improved
#notesn, notesm, and notes scripts
#last box is the other five catted in a number of ways
#use ctrl b +z to toggle zooming of one specific panel
#use ctrl b +x to close a panel
#remove "send-keys \\\'micro/nano ./a-c,1-2/*\\\' C-m \\; split-window -v \\;" type chunks to
#make smaller grid presets
#notesm:
#swap rxvt for terminal of your choice
#(search and replace) micro/nano for text editor of your choice
mkdir -p ./0m4u/a/
mkdir -p ./0m4u/b/
mkdir -p ./0m4u/c/
mkdir -p ./0m4u/1/
mkdir -p ./0m4u/2/
touch ./0m4u/b/00{1..10}
touch ./0m4u/a/0{1..10}
touch ./0m4u/1/{a..z}
touch ./0m4u/2/a{a..z}
touch ./0m4u/c/{1..10}
echo $\'#!/bin/sh
#cat4n
#no overwrite by incoming/running tabs
cat ./a/* >> ./4nal.txt
cat ./b/* >> ./4nbl.txt
cat ./1/* >> ./4n1l.txt
cat ./2/* >> ./4n2l.txt
cat ./c/* >> ./4ncl.txt
\' > ./0m4u/cat4n
chmod 755 ./0m4u/cat4n
echo $\'#!/bin/sh
#cat4n0
#incoming 0verwrites contents
cat ./a/* > ./4na.txt
cat ./b/* > ./4nb.txt
cat ./1/* > ./4n1.txt
cat ./2/* > ./4n2.txt
cat ./c/* > ./4nc.txt
\' > ./0m4u/cat4n0
chmod 755 ./0m4u/cat4n0
echo $\'#!/bin/sh
cat ./a/* > ./4na.txt
cat ./b/* > ./4nb.txt
cat ./1/* > ./4n1.txt
cat ./2/* > ./4n2.txt
cat ./c/* > ./4nc.txt
cat 4n* > ./4cat.txt
\' > ./0m4u/allcat
chmod 755 ./0m4u/allcat
echo $\'#!/bin/sh
cat ./a/* >> ./4naa.txt
cat ./b/* >> ./4nba.txt
cat ./1/* >> ./4n1a.txt
cat ./2/* >> ./4n2a.txt
cat ./c/* >> ./4nca.txt
cat 4n* >> ./4cata.txt
\' >> ./0m4u/allcatted
chmod 755 ./0m4u/allcatted
echo $\'#!/bin/sh
micro ./1/*
\' > ./0m4u/mic1
chmod 755 ./0m4u/mic1
echo $\'#!/bin/sh
micro ./2/*
\' > ./0m4u/mic2
chmod 755 ./0m4u/mic2
echo $\'#!/bin/sh
micro ./a/*
\' > ./0m4u/mica
chmod 755 ./0m4u/mica
echo $\'#!/bin/sh
micro ./b/*
\' > ./0m4u/micb
chmod 755 ./0m4u/micb
echo $\'#!/bin/sh
micro ./c/*
\' > ./0m4u/micc
chmod 755 ./0m4u/micc
#addon1:
echo $\'#!/bin/sh
#cd ./0n4n/
./allcat
./allcatted
./cat4n
./cat4n0
micro ./*.txt
\' > ./0m4u/mitxt
chmod 755 ./0m4u/mitxt
#addon2:
echo $\'#!/bin/sh
tmux new-session \\; send-keys \\\'micro ./a/*\\\' C-m \\; split-window -v \\; send-keys \\\'micro ./b/*\\\' C-m \\; split-window -h \\; send-keys \\\'micro ./c/*\\\' C-m \\; split-window -h \\; send-keys \\\'micro ./1/*\\\' C-m \\; split-window -h \\; send-keys \\\'micro ./2/*\\\' C-m \\; split-window -v \\; send-keys \\\'./mitxt\\\' C-m \\; select-layout tiled \\; attach
\' > ./0m4u/6m1s
chmod 755 ./0m4u/6m1s
#if not symlinking back, replace the dot with the rest of your real path to make launcher codes or terminal calls for them. for a desktop file you could do the same or just open the folder in your file manager and click on individual or group launch for the subfolders.
' > /data/data/com.termux/files/usr/bin/applets/notesm
chmod 755 /data/data/com.termux/files/usr/bin/applets/notesm
echo $'
#!/bin/sh
#swap /usr/bin/lxterminal for terminal of your choice
#(search and replace) micro/mcedit -x for text editor of your choice
mkdir -p ./0mce/a/
mkdir -p ./0mce/b/
mkdir -p ./0mce/c/
mkdir -p ./0mce/1/
mkdir -p ./0mce/2/
touch ./0mce/b/00{1..10}
touch ./0mce/a/0{1..10}
touch ./0mce/1/{a..z}
touch ./0mce/2/a{a..z}
touch ./0mce/c/{1..10}
echo $\'#!/bin/sh
#cat4n
#no overwrite by incoming/running tabs
cat ./a/* >> ./4nal.txt
cat ./b/* >> ./4nbl.txt
cat ./1/* >> ./4n1l.txt
cat ./2/* >> ./4n2l.txt
cat ./c/* >> ./4ncl.txt
\' > ./0mce/cat4n
chmod 755 ./0mce/cat4n
echo $\'#!/bin/sh
#cat4n0
#incoming 0verwrites contents
cat ./a/* > ./4na.txt
cat ./b/* > ./4nb.txt
cat ./1/* > ./4n1.txt
cat ./2/* > ./4n2.txt
cat ./c/* > ./4nc.txt
\' > ./0mce/cat4n0
chmod 755 ./0mce/cat4n0
echo $\'#!/bin/sh
cat ./a/* > ./4na.txt
cat ./b/* > ./4nb.txt
cat ./1/* > ./4n1.txt
cat ./2/* > ./4n2.txt
cat ./c/* > ./4nc.txt
cat 4n* > ./4cat.txt
\' > ./0mce/allcat
chmod 755 ./0mce/allcat
echo $\'#!/bin/sh
cat ./a/* >> ./4naa.txt
cat ./b/* >> ./4nba.txt
cat ./1/* >> ./4n1a.txt
cat ./2/* >> ./4n2a.txt
cat ./c/* >> ./4nca.txt
cat 4n* >> ./4cata.txt
\' >> ./0mce/allcatted
chmod 755 ./0mce/allcatted
echo $\'#!/bin/sh
mcedit -x ./1/*
\' > ./0mce/mcx1
chmod 755 ./0mce/mcx1
echo $\'#!/bin/sh
mcedit -x ./2/*
\' > ./0mce/mcx2
chmod 755 ./0mce/mcx2
echo $\'#!/bin/sh
mcedit -x ./a/*
\' > ./0mce/mcxa
chmod 755 ./0mce/mcxa
echo $\'#!/bin/sh
mcedit -x ./b/*
\' > ./0mce/mcxb
chmod 755 ./0mce/mcxb
echo $\'#!/bin/sh
mcedit -x ./c/*
\' > ./0mce/mcxc
chmod 755 ./0mce/mcxc
echo $\'#!/bin/sh
#cd ./0mce/
./allcat
./allcatted
./cat4n
./cat4n0
mcedit -x ./*.txt
\' > ./0mce/mcxtxt
chmod 755 ./0mce/mcxtxt
echo $\'#!/bin/sh
tmux new-session \\; send-keys \\\'mcedit -x ./a/*\\\' C-m \\; split-window -v \\; send-keys \\\'mcedit -x ./b/*\\\' C-m \\; split-window -h \\; send-keys \\\'mcedit -x ./c/*\\\' C-m \\; split-window -h \\; send-keys \\\'mcedit -x ./1/*\\\' C-m \\; split-window -h \\; send-keys \\\'mcedit -x ./2/*\\\' C-m \\; split-window -v \\; send-keys \\\'./mcxtxt\\\' C-m \\; select-layout tiled \\; attach
\' > ./0mce/6mx
chmod 755 ./0mce/6mx
#if not symlinking back, replace the dot with the rest of your real path to make launcher codes or terminal calls for them. for a desktop file you could do the same or just open the folder in your file manager and click on individual or group launch for the subfolders.
' > /data/data/com.termux/files/usr/bin/applets/notesmcx
chmod 755 /data/data/com.termux/files/usr/bin/applets/notesmcx
#make a copy of the three defaults (0n4n, 0m4u, 0mce) in the CUS folder:
cd /storage/emulated/0/CUS/
note
#deps:
#pkg install tmux
#pkg install nano
#pkg install micro
#pkg install mc
#(xsel and/or xclip and some repos that need to be added (termux opens with suggestions) could also be helpful)
#i'm leaving this part commented out as you may already have some/all of it.
#the android/termux version of pkg is backwards compared to sc0ttman's; if you haven't got micro/nano/tmux installed but have installed his gui/cli package manager (
http://murga-linux.com/puppy/viewtopic. ... 531#985531) the above (uncommented and with the install swapped to add would add those packages in puppy (but for this to work in puppy, you'd still need to swap the path1 path2 matches (see the cd bash shortcuts) for that stuff to work (/root/my-applications/bin is where i usually send the non-nwp nwp stuff)).
#in nano, use alt plus
< > to cycle through the batch of documents in a given pane; in micro use
, .; in mcedit use
F9 w l (unless you know of a faster way to get the document
list).
alt+g is help in both nano and micro.
alt+m toggles mouse support in nano.
#swap out the names/locations of the default folders and text editors (nano, micro, and/or mcedit -x) before running and those changes will be present as the new defaults
#enjoy.
#
#---puppus dogfellow, 8/12/19
#
__________
(440 pm edt)
____
some of android's configuration files end up in /../home/.config and others in ../etc. mcedit's configuration folder is in .config/../mcedit, but its .config (which would need to be created) is not one of the configuration files that pops open with the bashn or bashm command (nano or micro opening their configuration files and bash.bashrc). as the comments say,
enjoy.
____
almost forgot: the tnux.0 pet is just a fix of the earlier tnux.pet: i accidently had some files with duplicate names and i left out the nwp shortcuts for the gui text editors opening these files.
tnux.1 will include (a possibly compressed to keep deactivated..paths are different so it shouldn't cause a problem regardless...) version of this script--swap the paths and it's puppy friendly without forcing specific terminals on your batch and editor choices.
..
before i realized you had to use bash /path/to/script to call non-PATH scripts in android, i was saving the scripts to a folder, catting them (cat ./script), and then using highlight middle click paste to run the contents. sometimes the non terminal android editors are better at making a highlight to select and middle click to dump in a terminal script, but as long as you remember to toggle the mouse on and off in nano (alt m) and install xsel or xclip, moving the text around isn't too awkward (compared to what it was like the last time i tried to write using terminal text editors). last box in the six grid updates each time it's run, so holding down ctrl x in nano or ctrl q in micro to clear it and then arrowing back up to rerun the box gets the updated versions. control s is save in both. tmux has its own clipboard function, but it still seems a bit awkward to me compared to highlighting to select and middle clicking to paste (or relying on the android clipboard. control+b (then) = will get you what you've managed to grab with the tmux clipboard).
..