Add autostart manager with XDG autostart support

This commit is contained in:
lashman
2026-02-27 23:45:58 +02:00
parent 730452072f
commit 9cf4f1126c
3 changed files with 98 additions and 0 deletions

View File

@@ -1744,6 +1744,16 @@ impl Database {
Ok(self.conn.last_insert_rowid())
}
// --- Autostart ---
pub fn set_autostart(&self, id: i64, enabled: bool) -> SqlResult<()> {
self.conn.execute(
"UPDATE appimages SET autostart = ?2 WHERE id = ?1",
params![id, enabled as i32],
)?;
Ok(())
}
// --- Launch statistics ---
pub fn get_top_launched(&self, limit: i32) -> SqlResult<Vec<(String, u64)>> {