Skip to content

Commit 1cc7cde

Browse files
committed
Fix ENOET bug
1 parent 811ae1f commit 1cc7cde

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/presentationMode.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ const util = require("util");
44
const Store = require("electron-store");
55
const store = new Store();
66

7-
const getWallpaper = util.promisify(callback => {
8-
osascript.executeFile(`./lib/getWallpaper.scpt`, function(err, result) {
7+
const getWallpaper = util.promisify((appPath, callback) => {
8+
osascript.executeFile(`${appPath}/lib/getWallpaper.scpt`, function(
9+
err,
10+
result
11+
) {
912
if (err) return console.error(err);
1013
callback(null, result);
1114
});
@@ -43,7 +46,7 @@ const turnOn = async (options = {}, appPath) => {
4346
"Macintosh HD:Library:Desktop Pictures:Solid Colors:Solid Mint.png",
4447
"Macintosh HD:Library:Desktop Pictures:Solid Colors:Solid Mint.png"
4548
];
46-
const wallpaper = await getWallpaper();
49+
const wallpaper = await getWallpaper(appPath);
4750
store.set("wallpaper", wallpaper);
4851
changeWallpaper(appPath, list);
4952
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pliim",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description":
55
"One click to hide desktop icons, turn off notifications and hide active apps",
66
"main": "main.js",

0 commit comments

Comments
 (0)