Skip to content

Instantly share code, notes, and snippets.

@scripting
Last active March 17, 2017 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scripting/b7a12552935e8454bf8e99babd4988f3 to your computer and use it in GitHub Desktop.
Save scripting/b7a12552935e8454bf8e99babd4988f3 to your computer and use it in GitHub Desktop.
Create a new window with an icon in Electron on Linux
app.on ("ready", function () {
var nativeIcon = NativeImage.createFromPath (__dirname + "/" + "pork.png");
mainWindow = new BrowserWindow ({
width: 1100,
height: 1000,
icon: nativeIcon
});
mainWindow.loadURL('file://' + __dirname + '/index.html');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment