1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

feat(Notepad): add notepad desktop entry & IPC commands file handling

This commit is contained in:
purian23
2026-07-04 16:10:56 -04:00
parent bfda5f2d66
commit 81a4d3b4e0
23 changed files with 129 additions and 1 deletions
+16
View File
@@ -385,6 +385,22 @@ Item {
return "NOTEPAD_OPEN_FAILED";
}
function openFile(path: string): string {
if (!path)
return open();
if (SettingsData.notepadDefaultMode === "popout") {
PopoutService.openNotepadPopoutWithFile(path);
return "NOTEPAD_OPEN_FILE_SUCCESS";
}
var instance = getActiveNotepadInstance();
if (instance) {
instance.show();
instance.loadedItem?.openExternalFile(path);
return "NOTEPAD_OPEN_FILE_SUCCESS";
}
return "NOTEPAD_OPEN_FILE_FAILED";
}
function close(): string {
if (SettingsData.notepadDefaultMode === "popout") {
PopoutService.notepadPopout?.hide();