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
|
|
@ -6,13 +6,12 @@
|
|||
mod core;
|
||||
mod wayland;
|
||||
|
||||
use crate::core::Layout;
|
||||
use crate::core::Configuration;
|
||||
use crate::wayland::Dispatcher;
|
||||
use polling::Event;
|
||||
use polling::Events;
|
||||
use polling::Poller;
|
||||
use std::mem;
|
||||
use std::path::Path;
|
||||
use std::time::Instant;
|
||||
use wayland_client::globals;
|
||||
|
||||
|
|
@ -32,10 +31,9 @@ fn main()
|
|||
let (globals, mut queue) = globals::registry_queue_init::<Dispatcher>(&conn)
|
||||
.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();
|
||||
dispatcher.set_osk(VisibilityManager());
|
||||
|
||||
let gfx = dispatcher.graphics();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue