This will probably sounds too dumb but how can I maximize the oni? I tried setting the background image size to either "cover" or "contain" but doesn't seem like its working.
Hi @HiCodin ,
Which platform are you using? Are you looking to have ONI default to maximize on startup? I don't think there is actually a setting for that, but it would make sense to have one for sure
I am on El Capitan and yes, i'd like to have oni default to maximize on startup or at least be able to specify the size. I thought it's already in the config and i just can't find it. :D
Seems like the work here would be:
oni.editor.maximizeOnStart to Config.ts@extr0py , I think we need to add an "OnStart" field in config.json instead of having editor.action and editor.actionOnStart for everything. Just a thought
if we further follow this, we could actually just let arbitrary JS go in there instead, as long as the action exists in the editor it could be called.
@extr0py not to be dense, but would this be the UI or regular index. To further my density, what exactly is the BrowserWindow in index? I'm assuming that main creates browser window, and then index is somehow called, but I couldn't find a BrowserWindow object in index.tsx. I don't know if putting logic in main is either the right solution or a really dumb idea... :/
Is there anything that you would personally recommend that would help me get a better feel for the structure of oni?v
Alright, this is sort of a progress report in a way, but I now realize we can do remote.BrowserWindow.getFocusedWindow().maximize().
The issue with this is that it doesn't start the window in maximized mode or fullscreen, it renders (rather slowly) in initial and then after some delay maximizes, which is why I was wondering about putting logic in main so as not to re-render.
@extr0py I don't mean to be destroying your inbox, just looking for input on the last comment. I know I'm asking enough that you might as well do it yourself, but this is a learning process for me too :)
Hey @bert88sta , oh no worries :) It's great to see your initiative! Sorry if my responses are a bit delayed... I promise I'm not ignoring you, work has just been taking up a lot of my time this past couple of weeks.
You've done an excellent job diving in - yes, this method remote.BrowserWindow.getFocusedWindow().maximize() is exactly what we need.
In terms of implementation, it does seem like we have two potential ways we can implement it:
main.js - on the upside, this would let us maximize immediately, but on the downside, there isn't any config plumbing there (at the moment).I think, for now, implementing in browser\src\index.tsx would be the most straightforward, since the config info is already there. Ideally, we can improve startup time so that delta is less visible. I like to defer to the simplest solution barring any other constraints. Somewhere in that start method - probably towards the top. Plus, if we can fix the startup time, it begins a non-issue
For the project structure, you have a great point, it might be worth adding some notes in the CONTRIBUTING.md about the structure. I'm thinking of some starting notes like:
\main.js - entry point for the app that creates the app windowbrowser\src - ONI application code (UI / neovim integration)browser\src\index.tsx - initialization logic that starts up Neovim, hooks up to the interop layerbrowser\src\UI - folder that contains all the rich UI components (React + Redux)browser\src\Services - contains editor services like live evaluation, quick open, error managementvim - packaged vim plugins, default pluginsplugin_api - API surface that is exposed to javascript pluginsBut it'd be helpful to get your ideas since you have a fresh perspective-
Hope that helps! Thanks for your contributions
@HiCodin:
Add to your Config.json
editor.fullScreenOnStart : true
as an option. See PR #203
@bert88sta @extr0py Thanks for the hard work. the fullscreen option is working perfectly. 馃憤
Awesome, thanks for confirming @HiCodin - and thanks for the fix @bert88sta ! Will close this out. We might want to add this to the README.md as well as one of the configuration options-
Is there a keyboard shortcut for switching? I would have assumed cmd-shift-f or cmd-enter as most apps.
Most helpful comment
@HiCodin:
Add to your Config.json
editor.fullScreenOnStart : true
as an option. See PR #203