add yaml configuration
Example: %YAML 1.2 --- longpress_ms: 600 repeat_ms: 25 layout: latn_qwerty_us.xml wayland: height: 185
This commit is contained in:
parent
7d36dfaf89
commit
d884e71d86
10 changed files with 42 additions and 33 deletions
|
|
@ -7,7 +7,7 @@ mod core;
|
|||
mod dbus;
|
||||
mod wayland;
|
||||
|
||||
use crate::core::Layout;
|
||||
use crate::core::Configuration;
|
||||
use crate::dbus::session;
|
||||
use crate::dbus::osk::OSK0;
|
||||
use crate::wayland::Dispatcher;
|
||||
|
|
@ -15,7 +15,6 @@ use polling::Event;
|
|||
use polling::Events;
|
||||
use polling::Poller;
|
||||
use std::future::pending;
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
use tokio::task;
|
||||
|
|
@ -44,10 +43,9 @@ async fn main()
|
|||
let (globals, mut queue) = globals::registry_queue_init::<Dispatcher>(&conn_wl)
|
||||
.expect("Registry required");
|
||||
|
||||
let layouts = Path::new("/usr/share/unfettered-keyboard/layouts");
|
||||
let layout = Layout::load(layouts, "latn_qwerty_us.xml")
|
||||
.expect("Layout should be loadable");
|
||||
let mut dispatcher = Dispatcher::new(layout, queue.handle(), &globals).unwrap();
|
||||
let config = Configuration::load().unwrap();
|
||||
|
||||
let mut dispatcher = Dispatcher::new(&config, queue.handle(), &globals).unwrap();
|
||||
|
||||
let wl_evt = Event::readable(0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue