vercel / hyper Goto Github PK
View Code? Open in Web Editor NEWA terminal built on web technologies
Home Page: https://hyper.is
License: MIT License
A terminal built on web technologies
Home Page: https://hyper.is
License: MIT License
Our current method is kinda flawed :\
The webview should be able to execute processes and also know the ttyname.
That way, the index.js
does less, we don't need to maintain subscriptions for title publishing, no blur / focus, etc. will execute the commands directly.
Default update interval runs every 5 seconds. this should run way less frequently.
Exception occurs after trying to run npm run launch
and produces this error.
> hyperterm@0.1.0 launch /home/proxima/Desktop/hyperterm-0.1.0
> electron index
App threw an error during load
Error: Module version mismatch. Expected 48, got 47.
at Error (native)
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
at Object.Module._extensions..node (module.js:568:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/proxima/Desktop/hyperterm-0.1.0/node_modules/child_pty/lib/child_pty.js:1:90)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Module version mismatch. Expected 48, got 47.
at Error (native)
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
at Object.Module._extensions..node (module.js:568:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/proxima/Desktop/hyperterm-0.1.0/node_modules/child_pty/lib/child_pty.js:1:90)
Node & npm versions
node -v5.1.0
npm -v3.8.1
OS
Arch Linux 4.6.2
When a tab becomes active, at the moment we show it in blue:
We do this by simply capturing new data to write to the terminal. What we can do: if /error/i
matches the data
we pass along, we can make that label red instead.
A red tab is orders of magnitude more interesting in terms of prioritization of attention than a blue tab.
There are opportunities for false positives, but I can't think of many.
Do you think this is too obtrusive and error prone for us to ship with, and therefore should be an extension?
Should we hide it by default?
If I press and hold a navigation key in vim like h
or j
the repeat doesn't register like it does in Terminal/iTerm.
hterm-umdjs mirrors hterm's official git, whereas hterm-umd currently in use seems to be a one-time build, likely to be out-of-date.
In case you ever decide to upgrade hterm. ;)
If you're on the last tab and you moveRight
, it should focus the first one.
If you're on the first tab and you moveLeft
, it should focus the last one.
Trying to build locally (on Linux) I hit:
ERROR in Entry module not found: Error: Cannot resolve module 'babel-loader' in /home/daniel/dev/hyperterm/app
Installing that then asks for babel-core
, installing that leads to an Unknown plugin "transform-react-jsx"
error. An webpack watch
entry in package.json scripts would be good in addition to more complete devDependencies
.
Fullscreen mode would be great :)
Edit: With shortcut support
I use cmd+h to hide all windows belong to an app (can't remember if it's default OS X behaviour or not). It's working in other Electron apps, such as Slack and Atom, when focusing on text inputs. Not sure if this is true for other global OS X shortcuts people have set up.
Edit: I tried with cmd+option+m for minimizing the current window, which isn't working in Hyperterm.
Version: 0.2.1.
It's only possible to close a tab by hitting cmd+w, which perhaps shouldn't be the only way of closing a tab.
Version: 0.2.1
(I'm filing a bunch of UI stuff now, to keep track of them. Can be triaged).
A few things we need in there:
I also think that we should convert all "TODO" items into issues (makes them easier to manage and discuss about with the community).
The problem is that we can't give programmatic focus to hterm (it seems) when keyboard events are used. It seems to require a click event, probably due to the fact that there's an <iframe>
in the way.
We might need to register all the Mousetrap
shortcuts as accelerators in Electron as well.
If you open a new tab within terminal.app
, the tab will automatically point to the directory of the tab from which you've opened the new one.
It's a pretty handy feature, so I think it should also be in hyperterm!
So I use Spanish ISO keyboard (like this one: http://g01.a.alicdn.com/kf/HTB1iOQ8HVXXXXaeXpXXq6xXFXXXd/Spanish-Euro-Keyboard-Cover-Protector-for-MacBook-Air-11-11-6-Inch-European-ISO-Keyboard-Spain.jpg_640x640.jpg), and it is impossible to type some characters.
For example, "special" characters like ¿¡· are displayed like this: <00c2><00bf><00c2><00a1><00c2><00b7>, same with the ñ.
And other keyboard combinations are just impossible to type, my biggest issue is ~, since I need to type Alt + ñ but it just doesn't appear. Same issue with any letter with an accent (á, ö, â, etc).
I'm using zsh, if it matters.
Hopefully the fullscreen events fire in the main browser window
to make this easier.
Hi,
I'm using this already and I really like the aesthetic and of course the fact that uses web tech. Kudos for having something usable day to day so early.
I was wondering though what your vision of what hyperterm will look like is. I've been toying with the idea of a web/electron shell for a while, but my thinking for building a web tech based terminal emulator is to be able to use complex UIs, not to provide a seamless xterm experience using web technologies.
Is the end goal of the project to be "the Atom of terminals"?
Do you plan or making it extensible so rich media can be embedded, for example as a result of a command execution (showing image thumbnails on ls
is the example that comes to mind)? Or is the goal to have it always be 100% compatible with current terminal emulators?
Thanks!
Text does not wrap when you reach the end of the window but when you expect text to be on the third line it does wrap and goes to the second line.
I presumed I could exit a website with ctrl + c
- similar to other terminal processes and it took a little while to figure out it was command + w
. Not a big deal, but thought I'd mention :)
When modifying commands in other terminal apps (and text editors), option-arrow acts like the b
and w
commands in vi
, jumping to the next word boundary. In hyperterm, it instead prints ;3D
and makes the ^G
noise.
Note that option-delete acts as expected, deleting to the nearest word boundary.
I can't seem to figure out the command (if there is one) for exiting a webview session without closing the corresponding tab as well. Totally acceptable if that's not supported, but might be a nice feature addition if it's not already in there!
Allowing a custom stylesheet offers a lot of possibilities to make hyperterm like home, for example changing the font and font-size.
It could be implemented with the simple convention of having a style.css
(maybe style.less
) in ~/.hyperterm/
.
In zsh
with oh-my-zsh installed trying to run google.com
or apple.com
from Hyperterm produces this error:
❯ google.com
zsh: command not found: google.com
When I exec bash
and run google.com
loading websites works perfectly. Any thoughts?
We can accomplish this by opening a new tab and writing:
'$EDITOR ~/.hyperterm.json\n'
to it :D
Perhaps also we can write a test for the absence of $EDITOR
in the same command to warn in red letters about not having configured an editor and to try manually.
Goals and improvements over the ugly hack we have:
Assets:
Thanks to @matiastucci for bringing this electron API to my attention.
There's a rule, presumably down in Electron, that is setting -webkit-font-smoothing: antialiased
for x-screen
. Perhaps I'm extra sensitive to this, but this looks absolutely terrible on non-retina screens. When I toggle that rule in the inspector everything looks great. Personally I think that also looks better on a retina screen. It might be worth considering enforcing subpixel-antialiasing (IMO always, but could be on a media query for < 2 pixel density), or eventually some setting even.
IMHO, these two aren't related at all. Because of this, the badge shouldn't link to the site.
Hey! I'm loving using this so far, there's only one thing missing that helps me with my workflow.
I'd love to see multiple panes in tabs. For example, you could use CMD+D
for a horizontally split pane or CMD+SHIFT+D
for a vertically split pane from the currently selected. I don't have any particularly good ideas on how to navigate the panes with keyboard commands. Atom uses CMD+K
then CMD+[directional arrow]
to navigate between split panes.
Anyway, I'd absolutely love to see this feature in hyperterm, I hope it's possible!
The whole Hyperterm window is moved when dragging a tab with the mouse.
Version: 0.2.1
(I'm filing a bunch of UI stuff now, to keep track of them. Can be triaged).
Continuing from the "Allow custom stylesheet" thread (#10).
The way I want to do this is directly with the JS extensions API. You would basically register a plugin that registers CSS.
The sample extension we'll have is one that makes the theme light during the day and dark at night. This will show off adding CSS and also adding a bit of JS logic, so it's a good all-around example.
I'll probably use webpack in the example build step so that you can require('./something.css')
. People that want to use sass can simply use a sass loader or add another step to get the .css
from the .sass
.
On Mac OS terminals, the default command to clear scrollback is command-k, which my fingers are trained to use often. Looks like the closest similar behavior is clear
or CTRL-L in hyperterm (although it doesn't clear, just puts the prompt at the top, which is a completely acceptable alternative for me). Might be nice to have this functionality for users switching from mac terminal
This is funny, I had a conversation about switching tabs via arrows vs []
with many people, the split is right there in the middle.
I'd definitely love to see CMD+Shift+[
and CMD+Shift+]
working in Hyperterm.
Currently, Hyperterm always start with a set size.
In most terminals it seems like the history goes away upon command+k. I personally find this annoying, since later I want to scroll back.
We should make it work like clear
, and if people miss the "history cleaning" behavior, we can add it as a modifier (command+shift+k for example).
package.json
doesn't list build
in its scripts but package.sh
suggests it should be there :) do you have commands for that and for a watcher or is it just browserify/etc?
EDIT: found the webpack script in app :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.