wayclip-daemon 0.2.0

Recording and management of Wayclip daemon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use wayclip_core::models::{
    clips::games::{Game, GameRegistry},
    error::WayclipError,
};

#[derive(Clone, Default)]
pub struct ExecutableDb;

impl ExecutableDb {
    pub fn load() -> Result<Self, WayclipError> {
        let _ = GameRegistry::global();
        Ok(Self)
    }

    pub fn by_exe(&self, exe: &str) -> Option<Game> {
        GameRegistry::global().by_exe(exe)
    }
}