Retrieves the type of action which should take place when the user double clicks the titlebar of an active window.
All of the APIs expose a Node.js style callback as the only argument, and return a Promise
- so you get the best of both worlds.
import titlebarAction from 'titlebar-action';
titlebarAction((err, action) => {
console.log(action); // 'Minimize', 'Maximize' or 'None'
});
MIT