diff options
author | Romain Porte <microjoe@microjoe.org> | 2020-07-12 00:34:37 +0200 |
---|---|---|
committer | Romain Porte <microjoe@microjoe.org> | 2020-07-14 10:38:23 +0200 |
commit | fc0ca71193af110d1edd84959f25064490895569 (patch) | |
tree | 451b9c3853269e9fb54b2f21def19b4252825317 /examples/current-theme.rs | |
download | plymouth-rs-fc0ca71193af110d1edd84959f25064490895569.tar.gz plymouth-rs-fc0ca71193af110d1edd84959f25064490895569.zip |
initial commit
Diffstat (limited to 'examples/current-theme.rs')
-rw-r--r-- | examples/current-theme.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/current-theme.rs b/examples/current-theme.rs new file mode 100644 index 0000000..f52d36d --- /dev/null +++ b/examples/current-theme.rs @@ -0,0 +1,12 @@ +use plymouth::Plymouthd; +use plymouth::Theme; + +fn main() { + let config = Plymouthd::default().expect("could not load default config file"); + println!("current theme is {:?}", config.current_theme()); + + if let Some(name) = config.current_theme() { + let theme = Theme::from_name(name).expect("could not load current theme"); + println!("theme details: {:?}", theme); + } +} |