rebuilding site Mon Aug 1 08:22:51 PM CST 2022

This commit is contained in:
James Feng Cao 2022-08-01 20:22:51 +08:00
parent 26bfc316fc
commit 47c46dc01a
9 changed files with 167 additions and 7 deletions

View File

@ -65,7 +65,7 @@ Shell command mode
<pubDate>Thu, 30 Jun 2022 00:00:00 +0000</pubDate>
<guid>/en/links/</guid>
<description>Clicking the following hypertext will install menus for long pressing the bookmark button (with star as icon):
<description>Click the following links to install menus popped by long pressing the bookmark button (with star as icon):
Wait for network msg
Certificate info
Web fullscreen
@ -151,6 +151,20 @@ are used for icons in the bottom toolbar. file &amp;quot;0&amp;quot; to replace
If a new button is defined (file name &amp;quot;20&amp;quot; exists), uweb also supports VectorDrawable with &amp;quot;android compiled XML&amp;quot; format. All icon files must be all VectorDrawables or 此时所有图标文件必须都是compiled XML格式或都是普通的图像格式png,jpg,gif等。用户可将VectorDrawable XML文件放到安卓项目目录assets下面重新生成apk文件以后将apk文件解压即可得compiled XML格式图标文件。</description>
</item>
<item>
<title>Termux</title>
<link>/en/termux/</link>
<pubDate>Sat, 01 Jan 2022 00:00:00 +0000</pubDate>
<guid>/en/termux/</guid>
<description>Only the termux versions provided along with uweb browser can work seamlessly.
Click the following links to install termux configurations: .bashrc
.inputrc
z.sh
commacd.sh
Copy existing termux installation to other devices target device: install termux app, then run &amp;quot;apt install openssh&amp;quot; inside the termux. source device: Send the &amp;quot;~/.ssh&amp;quot; folder with uweb browser to the network. target device: Uweb to visit &amp;quot;file://data/data/com.termux/files/home/&amp;quot; to reach the folder, then receive the data sent by the above source device.</description>
</item>
<item>
<title>Long pressed link menu</title>
<link>/en/longclick/</link>

View File

@ -143,6 +143,12 @@
</a>
</li>
<li class="post">
<a href="termux/index.html">
<span>Termux</span>
</a>
</li>
<li class="post">
<a href="longclick/index.html">
<span>Long pressed link menu</span>

View File

@ -104,7 +104,7 @@ Note: &#34;Engines&#34; needs file &#34;engine.search&#34;whose format is sam
<pubDate>Thu, 30 Jun 2022 00:00:00 +0000</pubDate>
<guid>/en/links/</guid>
<description>Clicking the following hypertext will install menus for long pressing the bookmark button (with star as icon):
<description>Click the following links to install menus popped by long pressing the bookmark button (with star as icon):
Wait for network msg
Certificate info
Web fullscreen
@ -258,6 +258,20 @@ are used for icons in the bottom toolbar. file &amp;quot;0&amp;quot; to replace
If a new button is defined (file name &amp;quot;20&amp;quot; exists), uweb also supports VectorDrawable with &amp;quot;android compiled XML&amp;quot; format. All icon files must be all VectorDrawables or 此时所有图标文件必须都是compiled XML格式或都是普通的图像格式png,jpg,gif等。用户可将VectorDrawable XML文件放到安卓项目目录assets下面重新生成apk文件以后将apk文件解压即可得compiled XML格式图标文件。</description>
</item>
<item>
<title>Termux</title>
<link>/en/termux/</link>
<pubDate>Sat, 01 Jan 2022 00:00:00 +0000</pubDate>
<guid>/en/termux/</guid>
<description>Only the termux versions provided along with uweb browser can work seamlessly.
Click the following links to install termux configurations: .bashrc
.inputrc
z.sh
commacd.sh
Copy existing termux installation to other devices target device: install termux app, then run &amp;quot;apt install openssh&amp;quot; inside the termux. source device: Send the &amp;quot;~/.ssh&amp;quot; folder with uweb browser to the network. target device: Uweb to visit &amp;quot;file://data/data/com.termux/files/home/&amp;quot; to reach the folder, then receive the data sent by the above source device.</description>
</item>
<item>
<title>Long pressed link menu</title>
<link>/en/longclick/</link>

View File

@ -47,7 +47,7 @@
<ul class="tags">
</ul>
<p>Clicking the following hypertext will install menus for long pressing the bookmark button (with star as icon):<br>
<p>Click the following links to install menus popped by long pressing the bookmark button (with star as icon):<br>
<a href="i:0gdefault.link::Wait msg:i:1c%0A">Wait for network msg</a></p>
<p><a href="i:0gdefault.link::Certificate info:i:1b%0A">Certificate info</a></p>
<p><a href="i:0gdefault.link::web fullscreen: location.href='i:5fsetTimeout(()=>document.documentElement.requestFullscreen(),50);';%0A">Web fullscreen</a></p>

View File

@ -296,6 +296,9 @@
hreflang="en"
href="/en/icons/"
/>
</url><url>
<loc>/en/termux/</loc>
<lastmod>2022-01-01T00:00:00+00:00</lastmod>
</url><url>
<loc>/en/longclick/</loc>
<lastmod>2020-11-06T00:00:00+00:00</lastmod>

View File

@ -62,13 +62,13 @@
<ul>
<li>Bottom toolbar button long pressing menus
<ul>
<li><a href="../searchurl/uas.html">User agents</a></li>
<li><a href="../uas/index.html">User agents</a></li>
<li><a href="../rjs/index.html">Javascript</a></li>
<li><a href="../urls/index.html">Url services</a></li>
<li><a href="../links/index.html">Links</a></li>
<li><a href="../cmds/index.html">Commands</a></li>
<li><a href="../searchurl/rjs.html">Remote javascript</a></li>
<li><a href="../searchurl/pccopy/index.html">Menu for selections</a></li>
<li><a href="../rjs/index.html">Remote javascript</a></li>
<li><a href="../pccopy/index.html">Menu for selections</a></li>
</ul>
</li>
<li><a href="../longclick/index.html">Menu for long pressing hypertext</a></li>
@ -93,7 +93,7 @@
<li><a href="../html5/index.html">Html5 application</a></li>
<li><a href="../filemanager/index.html">File manager</a></li>
<li><a href="../tools/index.html">Tools</a></li>
<li>Termux
<li><a href="../termux/index.html">Termux</a>
<ul>
<li><a href="../bc/index.html">GNU bc</a></li>
<li><a href="../gnuplot/index.html">Gnuplot</a></li>

67
en/termux/index.html Normal file
View File

@ -0,0 +1,67 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
<title>Termux</title>
<script type="text/javascript">
function findLang(){
let href = location.href;
for(let i=href.length-1;i>0;i--){
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
return i;
}
return 0;
}
function nav2(page){
let i = findLang();
location.href = location.href.substring(0,i+1)+page;
}
function nav2Lang(lang){
let i = findLang();
let href = location.href;
location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
}
</script>
</head>
<body>
<header class='header'>
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
<nav>
</nav>
</header>
<br />
<div class="container">
<h1 class="title">Termux
<br>
<span class="subtitle"></span>
</h1>
<ul class="tags">
</ul>
<p>Only the termux versions provided along with uweb browser can work seamlessly.</p>
<h4 id="click-the-following-links-to-install-termux-configurations">Click the following links to install termux configurations:</h4>
<p><a href="i:0h/data/data/com.termux/files/home/.bashrc:https://fastly.jsdelivr.net/gh/torappinfo/uwebzh/termux/bashrc">.bashrc</a></p>
<p><a href="i:0h/data/data/com.termux/files/home/.inputrc:https://fastly.jsdelivr.net/gh/torappinfo/uwebzh/termux/inputrc">.inputrc</a></p>
<p><a href="i:0h/data/data/com.termux/files/home/z.sh:https://fastly.jsdelivr.net/gh/rupa/z/z.sh">z.sh</a></p>
<p><a href="i:0h/data/data/com.termux/files/home/commacd.sh:https://fastly.jsdelivr.net/gh/shyiko/commacd/commacd.sh">commacd.sh</a></p>
<h4 id="copy-existing-termux-installation-to-other-devices">Copy existing termux installation to other devices</h4>
<ul>
<li>target device: install termux app, then run &quot;apt install openssh&quot; inside the termux.</li>
<li>source device: Send the &quot;~/.ssh&quot; folder with uweb browser to the network.</li>
<li>target device: Uweb to visit &quot;file://data/data/com.termux/files/home/&quot; to reach the folder, then receive the data sent by the above source device.</li>
<li>source device: Run &quot;sshd&quot;.</li>
<li>target device: Run the command &quot;scp -P 8022 -r [source ip]:.. ..&quot;</li>
</ul>
<h4 id="tips">Tips</h4>
<p>File system navigation:<br>
With <a href="https://github.com/rupa/z">z.sh</a> and <a href="https://github.com/shyiko/commacd">commacd</a>, user can reach any folder with few key stokes. Run &quot;v&quot; to launch uweb file manager on the current working directory, long click any file link to share.</p>
</div>
</body>
</html>

44
termux/bashrc Normal file
View File

@ -0,0 +1,44 @@
unset HISTFILE
if [[ $EUID -ne 0 ]]; then
history -r ~/.bash_history
else
history -r ~/.bash_history.root
fi
export HISTCONTROL=ignoreboth:erasedups
#shopt -s histappend
shopt -s globstar
export _Z_CMD=j
. z.sh
. commacd.sh
alias j="_z"
v(){
file=
if [ $1 ]; then
file=${1}
shift
fi
url="file://${PWD}/${file}"
am start -a android.intent.action.VIEW -d "$url" $@
}
d(){
word=$1
dict=${2:-ahd}
tdict ~/share/dict/$dict $1
}
z(){
#usage: z word dictname percent
word=$1
dict=~/share/dict/$2.xz
percent=''
if [ "$3" ]; then
percent=${3}p
fi
xz -cdf -- "$dict" | less -n +"${percent}/####$word"
}
export LESS=-inR

12
termux/inputrc Normal file
View File

@ -0,0 +1,12 @@
set editing-mode vi
$if Bash
Space: magic-space
$endif
"\e[A": history-search-backward
"\e[B": history-search-forward
set completion-prefix-display-length 2
Control-j: menu-complete
Control-k: menu-complete-backward