mirror of
https://codeberg.org/icewind/evdev-shortcut.git
synced 2026-06-03 18:14:10 +02:00
flake + ci rework
This commit is contained in:
parent
025ee6a620
commit
6e13b8e412
10 changed files with 178 additions and 165 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use std::path::PathBuf;
|
||||
use futures::{pin_mut, StreamExt};
|
||||
use std::pin::pin;
|
||||
use tokio_stream::StreamExt;
|
||||
use glob::GlobError;
|
||||
use evdev_shortcut::{Key, Modifier, Shortcut, ShortcutListener};
|
||||
|
||||
|
|
@ -11,9 +12,7 @@ async fn main() {
|
|||
let devices =
|
||||
glob::glob("/dev/input/by-id/*-kbd").unwrap().collect::<Result<Vec<PathBuf>, GlobError>>().unwrap();
|
||||
|
||||
let stream = listener.listen(&devices).unwrap();
|
||||
|
||||
pin_mut!(stream);
|
||||
let mut stream = pin!(listener.listen(&devices).unwrap());
|
||||
|
||||
while let Some(event) = stream.next().await {
|
||||
println!("{} {}", event.shortcut, event.state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue