Skip to content

Launch node-webkit apps at login (Mac, Windows & Linux)

Notifications You must be signed in to change notification settings

kyroskoh/node-auto-launch

 
 

Repository files navigation

node-auto-launch

NPM version Build Status Windows Build Status Dependency Status


Launch node-webkit apps at login (Mac, Windows and Linux)

Installation

npm install auto-launch

General

So far the api consists only enable disable and isEnabled.

Usage

For node-webkit apps you don't have to specify the path. It gets read from process.execPath :)

var AutoLaunch = require('auto-launch');

var nwAppLauncher = new AutoLaunch({
	name: 'My node webkit app yao'
});

nwAppLauncher.isEnabled(function(enabled){
	if(enabled) return;

	nwAppLauncher.enable(function(err){

	});

});

I added a method (removeNwjsLoginItem) to remove 'nwjs helper' app login item that might have been added to peoples accounts since the name change from node-webkit.

For general apps

var AutoLaunch = require('auto-launch');

var minecraftAutoLauncher = new AutoLaunch({
	name: 'Minecraft',
	path: '/Applications/Minecraft.app',
	isHidden: true // hidden on launch - only works on a mac atm.
});

minecraftAutoLauncher.enable();
//minecraftAutoLauncher.disable();

TODO:

  • Add getCurrentPath - So you can check if the app has moved a roundabout.

About

Launch node-webkit apps at login (Mac, Windows & Linux)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CoffeeScript 100.0%