henrikruscon / hyper-statusline

Status Line Plugin for Hyper
MIT License
387 stars 79 forks source link

Doesn't work on Windows :( #4

Closed stereokai closed 7 years ago

stereokai commented 7 years ago

Windows 10, Hyper 1.0.0

I'm also getting these errors in the devtools. Although they correspond to the SVG icons, they are straightforward and might shed some light on the issue:

errors

henrikruscon commented 7 years ago

Sadly I can't properly debug this on my own as I don't have Windows.

Do the SVG icons actually reside on that path? Does the status line show up at all?

It appears to be related to __dirname

stereokai commented 7 years ago

The correct path is C:\Users\Tom\.hyper_plugins\node_modules\hyper-statusline\icons (the slashes are missing), because it seems this: url('${__dirname}/icons/folder.svg'); isn't working. Maybe it needs to be resolved using nodejs path library?

Also the footer is definitely being created, but it isn't being populated. footer

stereokai commented 7 years ago

It's weird because logging __dirname spews out the correct path string: C:\Users\Tom\.hyper_plugins\node_modules\hyper-statusline However in Chrome (Electron) itself it's always url('C:\Users\Tom\.hyper_plugins\node_modules\hyper-statusline/icons/folder.svg')

stereokai commented 7 years ago

@henrikdahl and regarding the information not being populated, the command for cwd definitely won't work on Windows :)

henrikruscon commented 7 years ago

@stereokai You're definitely right, I wrote that particular code back when Hyper seemed to remain Mac OS only. I'm gonna look into alternatives ✌️

stereokai commented 7 years ago

Sweet, thank you!

henrikruscon commented 7 years ago

@stereokai Mind trying the os-windows branch for me? Changed the CWD code but I can't debug myself ✌️

stereokai commented 7 years ago

Well, I am definitely getting icons now, but nothing more. Also if I click any of the two icons on the bottom right corner, nothing happens. When I click the folder icon, Hyper freezes and quickly quits (I'm noting this because so far, every other plugin that made Hyper freeze would just make it hang with high cpu and Hyper would just remain stuck).

andrewbanchich commented 7 years ago

@stereokai Any update on this? Will this be fixed soon? I'd love to use it on Windows but it's not working for me either.

henrikruscon commented 7 years ago

@andrewbanchich I've been on a long vacation in the Caribbean so I've lacked time. But I'm gonna catch up with every issue including this. I was close to pushing a fix before I went ✌️

andrewbanchich commented 7 years ago

@henrikdahl Thank you!

henrikruscon commented 7 years ago

So I've tried multiple methods and the only one that ended up partially working was relying on titles but it was unreliable and afaik Windows doesn't even show the cwd in the title on most setups anyways.

I heard Hyper might expose a session value for CWD so I'll wait for that.

If you got any other ideas, please let me know. I tried all I can think of ✌️

dougd commented 7 years ago

See my PR #53 for another attempt at getting the cwd on win32. This again is a work around until it is properly supported by Hyper.