feat: allow applets to be shared modules

This commit is contained in:
2026-04-24 14:50:08 +02:00
parent 00c3e37ecf
commit 58d2e773fd
14 changed files with 405 additions and 10 deletions
@@ -197,17 +197,23 @@ void filemanager_open_entry(FileManagerState* fm, int idx) {
if (filemanager_is_virtual_view(fm) && fm->entry_types[idx] == FM_ENTRY_VIRTUAL_APP) {
DesktopState* ds = fm->desktop;
const FileManagerVirtualEntry& entry = fm->virtual_entries[idx];
if (ds && entry.builtin_id != DESKTOP_BUILTIN_NONE) {
if (ds && entry.kind == FM_VIRTUAL_ENTRY_BUILTIN
&& entry.builtin_id != DESKTOP_BUILTIN_NONE) {
desktop_launch_builtin(ds, entry.builtin_id);
return;
}
if (ds && entry.external_app_index >= 0 && entry.external_app_index < ds->external_app_count) {
if (ds && entry.kind == FM_VIRTUAL_ENTRY_EXTERNAL_APP
&& entry.external_app_index >= 0
&& entry.external_app_index < ds->external_app_count) {
const ExternalApp& app = ds->external_apps[entry.external_app_index];
if (app.launch_with_home) {
montauk::spawn(app.binary_path, ds->home_dir);
} else {
montauk::spawn(app.binary_path);
}
} else if (ds && entry.kind == FM_VIRTUAL_ENTRY_SHARED_APPLET
&& entry.shared_applet_path[0] != '\0') {
desktop_launch_shared_applet(ds, entry.shared_applet_path);
}
return;
}