Created
November 19, 2012 17:44
-
-
Save nvkv/4112224 to your computer and use it in GitHub Desktop.
A bit modified acmeedit from 9fans
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rc | |
. $PLAN9/lib/acme.rc | |
newwindow | |
st=$status | |
terminal=dumb | |
shell=rc | |
if (~ $st 1) { | |
acme -f /mnt/font/Menlo-Regular/13a/font $* & | |
exit '' | |
} | |
dir=`{dirname $1} | |
b=`{basename $1} | |
winctl name `{cd $"dir; pwd}^/$"b | |
winctl get | |
winctl cleartag | |
echo -n ' Put Undo Redo Cancel | Look ' | winwrite tag | |
fn event { | |
switch($1$2) { | |
case Mx MX | |
if(~ $9 Cancel) { | |
windel sure | |
exit cancelled | |
} | |
winwriteevent $* | |
case Ml ML | |
winwriteevent $* | |
} | |
} | |
wineventloop | |
exit '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment