Skip to content

Commit 1013b7c

Browse files
committed
Check the file Altaqwaa.desktop
1 parent 8c22e09 commit 1013b7c

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

Window/home.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = async function homeWindow(BrowserWindow, ipcMain, app, Tray, Me
99
createFile(path.join(app.getPath("appData"), './altaqwaa'));
1010
await location(path.join(app?.getPath("appData"), './altaqwaa'));
1111
let App_Path = path.join(app?.getPath("appData"), '/altaqwaa');
12-
12+
1313
let win
1414
let tray
1515
let contextMenu
@@ -136,9 +136,28 @@ module.exports = async function homeWindow(BrowserWindow, ipcMain, app, Tray, Me
136136
data += 'Type=Application\n'
137137
data += 'Comment=Altaqwaa-Islamic-Desktop-Application\n'
138138
data += 'Categories=Education'
139-
139+
140140
fs.writeFileSync(`${homePath}/.config/autostart/Altaqwaa.desktop`, data);
141-
141+
142+
}
143+
}
144+
145+
if (autostart) {
146+
147+
let desktop = fs.existsSync(`${homePath}/.config/autostart/Altaqwaa.desktop`);
148+
if (desktop === false) {
149+
150+
let data = '[Desktop Entry]\n'
151+
data += 'Name=Altaqwaa\n'
152+
data += 'Icon=org.altaqwaa.rn0x\n'
153+
data += 'Exec=altaqwaa\n'
154+
data += 'Terminal=false\n'
155+
data += 'Type=Application\n'
156+
data += 'Comment=Altaqwaa-Islamic-Desktop-Application\n'
157+
data += 'Categories=Education'
158+
159+
fs.writeFileSync(`${homePath}/.config/autostart/Altaqwaa.desktop`, data);
160+
142161
}
143162
}
144163

0 commit comments

Comments
 (0)