How to permanently display the Touch Bar from one specific app when running? - node.js

I've developed an app based on NodeJS with Electron for a web agency and try to extend it to the touch bar functionality of the MacBook Pro.
Developers launch the app once, which then automatically starts various processes in the background, such as compiling SASS files, optimizing images, etc.
Typically, these developers work with programs such as SublimeText or Atom. However, it often happens that the app expects user input during programming or inserts hints to optimize the code. I would like to display these things in the Touch Bar so that the user does not have to switch between the apps during programming. Unfortunately, the touch bar view of my app is hidden when switching to SublimeText or another app and replaced by the current app in the foreground.
Is there a way to display an app's specific touch bar while the app is running (even hidden) permanently without replacing it? I wonder if that is at least natively possible?
I couldn't find any information about this on the Electron documentary or somewhere elseā€¦
Thank you in advance!

Related

How to change the content and size of the app window that installs the extension

I created a Safari Web Extension using the script that generates the project from a Chrome extension.
My users are confused by the process of buying the app and then running it which just opens a window that does nothing (they keep asking for refunds saying the app doesn't work). So I want to add some more text into the app window that tells them they have to look for the extension in Safari.
I can see how to add the text in the html file called "Main". But in my Mac app this means that the content no longer fits within the apps window. I'm trying to figure out how to change the size of the app window.
Also, the script generates a Mac app with a help menu but it just says that help is not available. How do I go about adding some help to explain that this App does nothing and that the extension is in Safari?
It seems like the script does a lot of the work for you but you still have to learn a bit about developing an App (rather than an extension) to make it a polished experience.

Is it possible to embed/stream/project the live image of a native Windows window into a webpage?

In the new Microsoft Flight Simulator you can pop different cockpit displays out into their own external windows, like this:
However, none of the buttons needed to interact with the displays get "popped out" as well.
I'd like to build a web app that can embed (the continuously updating image of) one of these windows that I can surround with buttons, etc, for interaction to have, say, running on a tablet next to you.
My question is, is it possible with Node to embed the continuously updating image of a native Windows window within a webpage?
Stumbled upon the Screen Capture API. This is what I was looking for.
https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API

Make electron window able to receive click event when above keynote app

I am working on electron app where i open a child window which i want to be above all the windows (not above fullscreen windows though), I managed to do it by using
win.setAlwaysOnTop(true, "screen-saver");
It now stays on top of all other open apps and keynote app presentation mode, i want user to be able to click buttons inside my window but now the issue is as soon as user clicks on button or just window in my child window, keynote window minimizes (as focus shifts to my window).
What i tried : I tried almost all available window option given in electron docs with different variations, I also tried playing with modals, but obviously modals stay in window itself, i want to keep main app minimized and keep child window on top of other apps. I also found electron-modal package, but that also behaves same.
working example
I was trying different application to check is any other application is able to do it, and i found that zoom app window (in screen share mode) is able to stay on top of keynote app and you can click buttons inside that app, you can move window, and keynote app keeps running in the background with no issues. I am trying to achieve exactly same behaviour.
This is something that you won't be able to recreate with electron currently, except through a native node module that manipulates your window related OS flags.
You can follow this issue on the Electron repository, since the flags introduced there should resolve your issue, or at least give you a point of entry to make your own PR or node_module.
https://github.com/electron/electron/issues/10078

How does App.js/node-webkit Display Window/Graphics?

I am a bit green on Linux in general. I have a BeagleBone that has Angstrom installed. I'd like to strip away as much as I can to get boot times down to a minimum. All I want it to do, is boot up - straight to an App.js or node-webkit (I believe there are pretty much the same?) application, displaying a Twitter Bootstrap HTML/CSS GUI.
A node.js application will be tied to this; and will be serving the very same page up via express.js.
So what does App.js/node-webkit 'need' to display itself? How does it work?
I am from a Microsoft background, so to display anything, in my mind, is you load the OS which has all the API's for display, and then you load the graphical application. Does the Linux kernel itself have this built in? Or do you need other 'packages'?
Would love a detailed answer to this; I've been running around the Internet for days.
If you are going to be running on embedded linux then chromium or other browser plus nodejs is going to be quite heavy -- I would guess around 64 Meg or so. On top of that you will then need to run an x environment / display server so you get the graphical GUI up and running.
If you want to take the easy way out find a ubuntu linux distribution for the board you are developing for. There are many other distributions and you are welcome to try them, but I do find that there are lots of blog posts and help for ubuntu linux. Once you have that working on your device you can then install nodejs and a browser to view it.
If you don't need to have a display connected to the device then you can just run nodejs and surf to the machine which can then run your application on port 80.
If you want to create an "embedded" application and go the more visual studio route then you can look at QT. There is BootToQT which should boot an android like device but then take over the screen and run your application: http://qt.digia.com/Product/Boot-to-Qt/. They also have chromium so it is possible embed an html view in your application http://qt-project.org/. The Qt apps can be built in C++ but I think they also have an xml like structure for defining interfaces. QT Designer gives you an IDE to develop in.

Web Browser Boot-Only Operating System

Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefer it to be a Linux based OS and Webkit based browser.
You might have to roll your own for something like that...my recommendation would be a small linux distribution and then figure out how to run the surf browser, possibly with the tabbed extension, exclusively. When the x environment starts up just execute those programs. You'd honestly never know the difference.
Here is a screenshot of what this all looks like on my computer, running dwm for window management, and surf + tabbed. This browser is controlled via the keyboard, so you'd have to get use to that.
You don't need to create an operating system, you can use Linux.
A simple implementation would be creating an application using Qt Embedded (qws) with a Widget containing a QWebView only (it's WebKit based), that would load a predefined address.
You could spawn that app from the init scripts (rcS for example) in an endless loop (simple bash script, so if the app crashes it gets loaded again)
You can prototype it with a simple hardware like beagleboard.org or friendlyarm.net boards.

Resources