Skip to content

Commit

Permalink
Fix ENOET bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zehfernandes committed Feb 15, 2018
1 parent 811ae1f commit 1cc7cde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lib/presentationMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ const util = require("util");
const Store = require("electron-store");
const store = new Store();

const getWallpaper = util.promisify(callback => {
osascript.executeFile(`./lib/getWallpaper.scpt`, function(err, result) {
const getWallpaper = util.promisify((appPath, callback) => {
osascript.executeFile(`${appPath}/lib/getWallpaper.scpt`, function(
err,
result
) {
if (err) return console.error(err);
callback(null, result);
});
Expand Down Expand Up @@ -43,7 +46,7 @@ const turnOn = async (options = {}, appPath) => {
"Macintosh HD:Library:Desktop Pictures:Solid Colors:Solid Mint.png",
"Macintosh HD:Library:Desktop Pictures:Solid Colors:Solid Mint.png"
];
const wallpaper = await getWallpaper();
const wallpaper = await getWallpaper(appPath);
store.set("wallpaper", wallpaper);
changeWallpaper(appPath, list);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pliim",
"version": "1.3.0",
"version": "1.4.0",
"description":
"One click to hide desktop icons, turn off notifications and hide active apps",
"main": "main.js",
Expand Down

0 comments on commit 1cc7cde

Please sign in to comment.