hyperlayout
hyperlayout copied to clipboard
Add more robust method to retrieve config JSON from the terminal
@timolins This fixes Hyperlayout simply printing out config for me and gets Hyperlayout to work on Windows. 😄
Awesome! Would be cool if you changed the variables from snake_case to camelCase to obey the linter. 🐫
Thanks 🙏
Green light
This might sound weird, but your pull request basically killed my Hyper.app. 😅
:(
Maybe try to disable one or more of the regexes I introduced to discover the culprit?
@timolins I had the same problem with PowerShell in my machine. (I tried with 3 different shells, including cmd and native Bash). The problem with PowerShell was that it was printing a security error to the terminal immediately after it was loaded - and it threw hyperlayout into a loop or a freeze somehow. Just to be more clear - that error text was being printed to the terminal before PowerShell's command prompt was visible and ready to receive commands.
That error was not related to Hyper, and would happen even if I opened PowerShell independently. The moment I fixed the error, (read: removed the content that was being printed before the command prompt was available in the terminal) the freeze was gone.
Does your terminal print some things before the command prompt is ready for input?
@timolins still there? :)
Awesome, thank you! Don't know how I missed this... Will check this out soon!
Edit: Oh wait, I mixed something up here. For some reason I thought you fixed that issue.
And no, my command prompt doesn't print anything before it's ready for input.
@timolins Did you try to disable one or more of the regexes I introduced to discover the culprit like I suggested? :)
This code killed my Hyper too. It is the configMatcher
which does it.
I've been wrestling with getting hyperlayout to work at all on Windows 7. The addition of the ANSI codes and line breaks isn't a simple one to solve. For example, my config was broken onto three lines, the first line break being inserted instead of a space within a command string. The second was inserted mid-string. If I replace the newlines with an empty string, I break that first command.
If I change the size of my Hyper window, then the line breaks go elsewhere and can be removed more safely. Is this really the best way to communicate between the command and the plugin?
I'm open for suggestions. While developing hyperlayout, I tried a few different approaches, but the current implementation was the best one I came up with. Of course this doesn't mean that there isn't a better one. Feel free to come up with a new solution! 🙂
Fair enough. At the moment I feel frustrated by the lack of documentation around the Hyper APIs. :) I don't think the issue is with hyperlayout per se.
Would it be possible for the plugin to do some of the work the command does? Reading the config files?
this fix seems to solve problems on windows
I see the project has drifted from the pull request.