update Toolbox and scripts
This commit is contained in:
parent
8920dc9db2
commit
ccb2aa148e
6 changed files with 81 additions and 2 deletions
5
Toolbox
5
Toolbox
|
@ -3,6 +3,7 @@
|
||||||
[ Edit 1,$-1d ] # clear win
|
[ Edit 1,$-1d ] # clear win
|
||||||
[ Edit x/^[ ]*/ a/# / ] # comment (replace # with comment prefix)
|
[ Edit x/^[ ]*/ a/# / ] # comment (replace # with comment prefix)
|
||||||
[ Edit x/^[ ]*# ?/ x/# ?/d ] # uncomment (replace # with comment prefix)
|
[ Edit x/^[ ]*# ?/ x/# ?/d ] # uncomment (replace # with comment prefix)
|
||||||
[ Edit s/^[ ][ ]//g ] # unindent
|
[ Edit s/^([ ][ ]|[\t]//g ] # unindent (2 spaces or tab)
|
||||||
[ Edit s/^/ /g ] # indent
|
[ Edit s/^/ /g ] # indent 2 spaces
|
||||||
|
[ Edit s/^/\t/g ] #indent tabs
|
||||||
[ Edit x/[^\n]\n[^\n]/ s/\n/ / ] # join lines
|
[ Edit x/[^\n]\n[^\n]/ s/\n/ / ] # join lines
|
17
scripts/F+
Executable file
17
scripts/F+
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
nx=1
|
||||||
|
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
nx=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ctl=$(9p read acme/$winid/ctl)
|
||||||
|
set -- $ctl
|
||||||
|
size=$(echo $7 | awk -F/ '{print $5}')
|
||||||
|
size=${size%a}
|
||||||
|
newsize=$((size + nx))
|
||||||
|
|
||||||
|
newfont=$(echo $7 | sed -e s/$size/$newsize/g)
|
||||||
|
|
||||||
|
echo font ${newfont} | 9p write acme/${winid}/ctl
|
16
scripts/F-
Executable file
16
scripts/F-
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
nx=1
|
||||||
|
if [ ! -z "$1" ]; then
|
||||||
|
nx=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ctl=$(9p read acme/$winid/ctl)
|
||||||
|
set -- $ctl
|
||||||
|
size=$(echo $7 | awk -F/ '{print $5}')
|
||||||
|
size=${size%a}
|
||||||
|
newsize=$((size - nx))
|
||||||
|
|
||||||
|
newfont=$(echo $7 | sed -e s/$size/$newsize/g)
|
||||||
|
|
||||||
|
echo font ${newfont} | 9p write acme/${winid}/ctl
|
5
scripts/Slide
Executable file
5
scripts/Slide
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo name $(pwd)/$1 | 9p write acme/${winid}/ctl
|
||||||
|
echo clean | 9p write acme/${winid}/ctl
|
||||||
|
echo get | 9p write acme/${winid}/ctl
|
23
scripts/Slide+
Executable file
23
scripts/Slide+
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
tagdata=$(9p read acme/${winid}/tag)
|
||||||
|
set -- ${tagdata}
|
||||||
|
path=$1
|
||||||
|
slide=$(basename ${path})
|
||||||
|
oldifs=${IFS}
|
||||||
|
IFS='
|
||||||
|
'
|
||||||
|
|
||||||
|
found=0
|
||||||
|
for s in *; do
|
||||||
|
if [ ${found} -eq 1 ]; then
|
||||||
|
Slide ${s}
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${s}" != "${slide}" ]; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
found=1
|
||||||
|
fi
|
||||||
|
done
|
17
scripts/Slide-
Executable file
17
scripts/Slide-
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
tagdata=$(9p read acme/${winid}/tag)
|
||||||
|
set -- ${tagdata}
|
||||||
|
path=$1
|
||||||
|
slide=$(basename ${path})
|
||||||
|
IFS='
|
||||||
|
'
|
||||||
|
|
||||||
|
for s in *; do
|
||||||
|
if [ "${s}" != "${slide}" ]; then
|
||||||
|
newslide=${s}
|
||||||
|
else
|
||||||
|
Slide ${newslide}
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in a new issue