/* * DWN - Desktop Window Manager * Application launcher with .desktop file support */ #ifndef DWN_APPLAUNCHER_H #define DWN_APPLAUNCHER_H #include /* Maximum applications to track */ #define MAX_APPS 512 #define MAX_RECENT_APPS 10 /* Application entry from .desktop file */ typedef struct { char name[128]; /* Display name */ char exec[512]; /* Command to execute */ char icon[128]; /* Icon name (unused for now) */ char desktop_id[256]; /* Desktop file basename for tracking */ bool terminal; /* Run in terminal */ bool hidden; /* Should be hidden */ } AppEntry; /* Application launcher state */ typedef struct { AppEntry apps[MAX_APPS]; int app_count; char recent[MAX_RECENT_APPS][256]; /* Desktop IDs of recent apps */ int recent_count; } AppLauncherState; /* Initialize the app launcher (scans .desktop files) */ void applauncher_init(void); /* Cleanup resources */ void applauncher_cleanup(void); /* Rescan .desktop files */ void applauncher_refresh(void); /* Show the application launcher (dmenu-based) */ void applauncher_show(void); /* Launch an application by desktop_id */ void applauncher_launch(const char *desktop_id); #endif /* DWN_APPLAUNCHER_H */