progriumJeff Lindsay

Apptron Demo: HTML5 Background Apps

In this week’s demo I built a background application using HTML and Apptron. It may seem weird to involve a webview at all for a background app, which is why this was not a use case I had planned, but I was pleasantly surprised to discover how this turned out.

Apptron Demo: HTML5 Background Appsyoutube · loads when you press play

In the last demo, we made an app indicator background utility as a shell script. This week we re-create it using JavaScript in an HTML file. With apptron build we can make it into a standalone executable. This workflow was originally intended for quick webview apps, but because we can let the JavaScript of the page run while the window is hidden, we effectively get a background application.

Apptron wasn’t made just for webview apps. I wanted to expose other native APIs that let you hook into more pre-built UI elements the operating system provides. For now this covers the common ones like app indicators, dialogs, and desktop notifications. In the future I’d like to expose APIs to let you add new items to system menus, control panels, and other places the OS lets developers hook into. These are important to make scriptable so you can easily leverage them for simple workflow hacks. When it’s easy to throw that kind of thing together, you don’t need to find “an app for that,” you can just imagine what would work for you and make it happen.

If this is also a world you want to see, join Apptron early access and help us get this thing out. See you next demo!

-jeff

Apptron Demo: Shell Scriptable Native APIs

In this demo I show off the rest of the Apptron CLI, which exposes most of the cross-platform APIs as commands. These commands make great shell scriptable utilities, and you can see how they’ve been designed to facilitate this. By the end, we’ll have created an app indicator (systray) icon and menu that’s created and driven by a shell script.

Apptron Demo: Shell Scriptable Native APIsyoutube · loads when you press play

There is a whole class of power users that doesn’t always want to take the time to “write a program,” let alone learn how. Since the functionality is right there, why not expose it in a way that’s useful for these folks? Sysadmins and devops engineers often spend most of their time at a command prompt, so this feature goes out to all of them.

It turns out having a CLI interface to the APIs also makes it easy to do basic regression testing for the project. It also provides a kind of accessible listing of functionality. And! It helps with our polyglot primitive goal, working as a stopgap before having native library support for a language, since nearly all languages can “shell out”.

As I mentioned in the video, this is a strategy I like to use when making generative primitives: maximize utility by providing multiple ways to access features. Like being language agnostic, this helps meet users where they are, and reach users you might not otherwise. There’s also often a dominant context people think of for some functionality, so showing it in a new or surprising context helps break people out of existing thought patterns and imagine new possibilities.

Let’s see what possibilities open up with the next demo! In the meantime, join early access to explore Apptron on your own.

-jeff

← October 2022 · July 2022 →