GeezerVison is showing github.com — Include text editor with standard distribution · Issue #66 · NodeOS/NodeOS
Include text editor with standard distribution #66DescriptionI think it would be a great idea if NodeOS came with a text editor. That would be one small but important step to having a fully functional, self-contained operating system. @groundwater and I spoke in #node-os on Freenode and he approves. There are two written in NodeJS that I know about: hipster, and slap. Full disclosure, I am the author of slap, so I am biased, but I strongly believe every OS should at least have a text editor. :) Activitygroundwater commented on Sep 16, 2014 I love this idea. We should test out how well slap works on a nodeos instance. piranna commented on Sep 16, 2014 "first-class mouse support"... I would love to see this on NodeOS :-) @Beardtree how did you achieved it? I have been reading on the topic and seems there's some dark ansi codes to manage mouse position and buttons, isn't it? How do you get the mouse events, using gdm? We should then to implement something similar (or use gdm itself until a Jascript-pure implementation is available...).
I like the idea of having a text editor, it fully makes sense. Only point I hope we don't end with simple vs full-featured, vim vs emacs, hipster vs slap flame-wars here on NodeOS... :-P dbkaplun commented on Sep 16, 2014 I can confirm that it works great! Steps to reproduce:
- On the host machine:
npm install slap && sudo docker run --volume=$(pwd)/node_modules/slap:/slap:rw -i -t nodeos/nodeos
- You should be inside the container now:
/slap/index.js (yes, this is the whole command)
I tried to install it via npkg. I had to run npkg install npm to update npm to at least v1.4. However, since there is no git executable, installation failed. I've opened #67, requesting git be added.
P.S. @piranna: all mouse events are sent as keystrokes after a certain ANSI escape code sequence is sent. All that's required for mouse support is a sane-enough terminal emulator, so no NodeOS dependencies for this are necessary. :) groundwater commented on Sep 16, 2014
I like the idea of having a text editor, it fully makes sense. Only point I hope we don't end with simple vs full-featured, vim vs emacs, hipster vs slap flame-wars here on NodeOS... :-P
The beauty of a fully open package ecosystem like npm is that everyone is free to choose their own path 😄 piranna commented on Sep 16, 2014 @Beardtree I'll need to test the mouse support myself, I'm trully curious about that point :-) On Docker and QEmu (let's hope we can upload updated images soon...) it's currently using /dev/console, I know it support ansi codes but the point is, how to read the mouse events and convert them to anse escape sequences? Does /dev/console is capable to do it, or it's necesary a gpm-like tool to do it? My question is more related to this point :-) dbkaplun commented on Sep 16, 2014 @piranna to test, see my above comment for steps to reproduce. The way mouse support works is very simple -- slap outputs a special ANSI escape code that says "send mouse events!" to stdout, which GNOME terminal/Terminal.app/xterm/etc captures. Then $TERMINAL starts sending ANSI mouse codes to stdin, which slap captures. There is no need for any middle layer, or interpretation by NodeOS or nsh. Hope that clears things up! piranna commented on Sep 16, 2014 Ok @Beardtree, just to be sure we are talking about the same, open a vterm (alt-ctrl-F1), launch slap there and tell me what's happening ;-) dbkaplun commented on Sep 16, 2014 @piranna ah yes, GPM/related is not currently supported in slap. That being said, I don't think many people will be installing NodeOS on their root partition just yet so mouse support in a plain old graphical terminal emulator will have to do for now. :P piranna commented on Sep 17, 2014 I told you ;-)
Ok, to resume: mouse support is easy with ansi codes but it's in a per-application (or library) basis, and this codes needs to be generated by a mouse driver like gpm. I'll add this to the alpha. modified the milestone: This milestone has been deleted on Feb 8, 2015piranna commented on Mar 30, 2015 I've added Slap on the demo users filesystem, so I'll close this. There are problems with blessed related to terminfo, once a solution is found and they are fixed blessed-based apps will work fine. dbkaplun commented on Mar 30, 2015 Sweet! How do I test this out? Is there a link to a commit or something? piranna commented on Mar 30, 2015 I add it some commits ago and forgot about this issue, you can get it on master :-) As I said there are problems with blessed, latest ones should have a valid terminfo for Linux terminal based on Ubuntu linux-vt one so it should look fine in a QEmu window, but remotely on Terminator or gnome-terminal it shows a blank screen due to Unicode and control characters... :-/ TylerLeonhardt commented on Dec 12, 2015 This looks great! How can I test this? Has this been added in? piranna commented on Dec 12, 2015
This looks great! How can I test this? Has this been added in?
Yes, slap is available inside the basic image :-)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|