-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some split screen examples #2
Comments
You should first split screen to your desired layout in |
Or you could try hyperlayout if all the panes have the same size. |
Also have the same issue. Tried installing the sample in .hyperinator. It says it loads and does nothing. README vaguely mentions a .tmuxinator directory, but doesn't say what to do with it. |
@jedis00 Oh sorry, |
It was a copy/paste of your advanced example into ~/.hyperinator/test.yml. Loaded it and it said it loaded but the panes didn’t change. Restarting and doing a reload didn’t help. |
What's the output? |
@bet4it Output below. The other thing is, I'm using this on Windows 10. Hyperinator is using the deprecated path to hyper.js, looking in ~/hyper.js. That file is copied elsewhere and removed in the latest Hyper builds, so I had to create a symlink to get it to work within Git Bash...
Contents of ~/.hyperinator/test.yml
|
@bet4it I'd like to be able to have something like this restored when I launch Hyper: |
@jedis00 I just published a new release, hyperinator should work on Windows now. Can you try it? windows:
- layout: 97b9,181x40,0,0{59x40,0,0,0,59x40,60,0[59x20,60,0,1,59x19,60,21,4],61x40,120,0[61x20,120,0,2,61x19,120,21,3]}
panes:
- echo '1'
- echo '2'
- echo '3'
- echo '4'
- echo '5' |
@bet4it Thanks! I removed the binary and plugin and reinstalled. Still seeing the same thing. It says it loads, but the window stays the same. Tried a full reload and relaunched, but I still have the one pane. There aren't any errors, it just doesn't appear to do anything.
|
Found that this breaks CTRL+SHIFT+D to open a new pane. Gives a javascript error:
If I close Hyper and relaunch without loading the config, CTRL+SHIFT+D works as expected. |
Oh that's a bit tricky. |
@bet4it Same. Yes, I am using hypercwd, and it is setting my directory correctly when Hyper fires up Git Bash.
I ran the
I commented out hypercwd, and CTRL+SHIFT+D does not give an error anymore. hyper-pane opens a new pane. But I am still not seeing any window layout from hyperinator. Should it take effect immediately after running |
Removed |
What about now? Hope I have fixed it. |
@bet4it Nope. No change:
What is the behavior that is supposed to happen? Is the window supposed to instantly change after running the load command? Is it necessary to have to run that every time? It doesn't appear to save anything in .hyper.js for the config to know it needs to load that. |
Could you edit diff --git a/index.js b/index.js
index e34ec99..39d4a49 100644
--- a/index.js
+++ b/index.js
@@ -335,6 +335,9 @@ exports.middleware = store => next => action => {
// Check for hyperinator config
if (type === 'SESSION_ADD_DATA') {
+ if (data.includes('hyperinator')) {
+ console.log(data)
+ }
const testedData = /\[hyperinator config: (.*)]/.exec(data.split(/\n/)[0])
if (testedData && testedData[1]) {
store.dispatch({ then run hyperinator and show me the result of Hyper's console? |
Which hyper version do you use, |
I'm using Hyper 3.1.0-canary.4 (stable) since there were issues with the version on their website and Windows 10. I don't have a setting for webGLRenderer in .hyper.js.
|
Could you give me a screenshot of the console? |
https://i.imgur.com/Uk3IZxJ.png - extremely hard to read with the color codes. |
What about this change: diff --git a/index.js b/index.js
index e34ec99..ca0efb2 100644
--- a/index.js
+++ b/index.js
@@ -334,7 +334,10 @@ exports.middleware = store => next => action => {
const {type, data, uid} = action
// Check for hyperinator config
- if (type === 'SESSION_ADD_DATA') {
+ if (type === 'SESSION_PTY_DATA') {
+ if (data.includes('hyperinator')) {
+ console.log(data)
+ }
const testedData = /\[hyperinator config: (.*)]/.exec(data.split(/\n/)[0])
if (testedData && testedData[1]) {
store.dispatch({ If you still can't notice any changes, remove the |
I guess |
Applied the second patch. Same stuff is being output to the console... but all of a sudden, it's working! Just tried it a second time, and sometimes it works and sometimes it doesn't. It says it loads, but nothing happens. If I run the command again, then it works sometimes. Thank you so much for your help! :) Would you be able to point me at what tool/setup you used to generate the window pane layouts? This is so exciting! |
The second patch is only a workaround and has a serious bug, you may find it if you close some windows. It's better to tell me your bash config, so I may reproduce it on my computer. Otherwise it's impossible for me to fix it.
I guess it may relate with terminal size?
|
.bashrc .bash_profile
~/.config/git/git-prompt.sh
|
What's the result of Could hyperinator work if you set |
|
Can't reproduce. Give up🙃 |
I set |
With unmodified code? |
I'm back to the first patch. Same behavior with it working sometimes. I removed my custom git-prompt.sh and am using the default one from Git Bash with the default color coding. Here's the output in the console when it doesn't load. Run load command and panes don't load:
Run command and panes do load:
|
Can hyper's official plugin, hyperpower, work on your environment, and you can use |
What about this patch to diff --git a/bin/hyperinator b/bin/hyperinator
index 29c0aef..023c346 100755
--- a/bin/hyperinator
+++ b/bin/hyperinator
@@ -25,7 +25,7 @@ const isPluginInstalled = (configPath) => {
}
-function start() {
+async function start() {
if (env.TERM_PROGRAM !== 'Hyper' && env.TERM_PROGRAM !== 'HyperTerm' && !env.HYPERINATOR) {
console.error('You need to use Hyper.app to run this command')
return
@@ -63,6 +63,7 @@ function start() {
console.error(err)
return
}
+ await new Promise(r=>setTimeout(r, 1000))
console.log(`[hyperinator config: ${cfgPath}]`)
break
default: |
Hey there, I have never tried hyperpower and am not familiar with the wow command. What would that test? With the new patch, I've been able to get hyperinator to launch 10 times in a row successfully, with no issues. I've tried closing panes and rerunning it, and relaunching Hyper multiple times. It seems that might solve some kind of race condition? Definitely seems like it helped, since it hasn't failed yet! |
I think I have solved this problem finally. |
For sure! I'll try 500 and report back. |
It seems to work reliably using 100 as the value. One thing I can't figure out is, in the example you provided, how it decides which echo goes to which window. Is it spacing those out based on the delay to determine which pane it goes to? Is it based on the unordered list in the config file? Anything in the first list goes to the first pane, etc.?
|
Yeah, the order of these panes is deterministic and only depends on the layout. You could calculate the order, but I think it's unnecessary. You could get the number of order by the output of |
Gotcha. Got tmux installed and played with it to make my own custom layout. Any idea why when it runs a command specified in the yml, that it includes an extra blank line prompt after the command runs (ie, echo)? |
This behaviour was introduced in timolins/hyperlayout#17. |
Hello there,
That plugin looks awesome, but it lacks a little documentation on how to split the screen. For example, I have no idea on how I could separate the screen in 2 rows, 6 columns, to have 12 even sub-screens.
A more detailed example section would be very welcome, as that plugin sounds really promising!
Thank you,
Ben
The text was updated successfully, but these errors were encountered: