electron-window-manager icon indicating copy to clipboard operation
electron-window-manager copied to clipboard

Feature Request: Ability to get the current window's name

Open dannyrb opened this issue 6 years ago • 1 comments

It would be nice if, in a renderer process, you could call something like:

windowManager.getCurrentWindowName()

And have it return the name associated with the BrowserWindow

dannyrb avatar Jun 29 '18 00:06 dannyrb

const { remote } = require('electron');
var windowManager = remote.require('electron-window-manager');
const thisWindow = windowManager.getById(remote.getCurrentWindow().id);
var windowName = new String(thisWindow.name);
// now you have the window name as windowName

JIC anyone needs it ♥

refeele avatar Sep 26 '20 20:09 refeele