1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Provider-agnostic data model shared across all autostart providers.
use Serialize;
/// Whether an autostart entry applies to the current user or the whole system.
/// A single autostart item, normalized across providers.
///
/// `id` is stable and unique *within a provider*; pair it with [`AutostartEntry::source`]
/// (the provider id) to address an entry unambiguously across the whole registry.
///
/// ```
/// use runlatch_core::{AutostartEntry, Scope};
///
/// let entry = AutostartEntry {
/// id: "redshift".into(),
/// display_name: "Redshift".into(),
/// description: None,
/// command: "redshift-gtk".into(),
/// icon: None,
/// enabled: true,
/// source: "xdg-autostart".into(),
/// scope: Scope::User,
/// };
/// assert_eq!(format!("{}:{}", entry.source, entry.id), "xdg-autostart:redshift");
/// ```