install necessary libs in CI #1
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
run: sudo apt-get install -qy cargo-1.80 rust-1.80-clippy
|
run: sudo apt-get install -qy cargo-1.80 rust-1.80-clippy
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: sudo apt-get install -qy liblzma-dev
|
run: sudo apt-get install -qy liblzma-dev libpipewire-0.3-dev libclang-dev libdbus-1-dev
|
||||||
|
|
||||||
- name: Run Clippy
|
- name: Run Clippy
|
||||||
run: cargo clippy --all-targets --all-features
|
run: cargo clippy --all-targets --all-features
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub fn execute_mode(mode: Mode, connection: Connection) {
|
||||||
Mode::Pixels { pixel_command } => pixels(&connection, pixel_command),
|
Mode::Pixels { pixel_command } => pixels(&connection, pixel_command),
|
||||||
Mode::Brightness { brightness_command } => brightness(&connection, brightness_command),
|
Mode::Brightness { brightness_command } => brightness(&connection, brightness_command),
|
||||||
Mode::Stream { stream_command } => match stream_command {
|
Mode::Stream { stream_command } => match stream_command {
|
||||||
StreamCommand::Stdin { slow } => stream_stdin(&connection, slow),
|
StreamCommand::Stdin { slow } => stream_stdin(connection, slow),
|
||||||
StreamCommand::Screen { options } => stream_window(&connection, options),
|
StreamCommand::Screen { options } => stream_window(&connection, options),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ use log::warn;
|
||||||
use servicepoint::*;
|
use servicepoint::*;
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
|
|
||||||
pub(crate) fn stream_stdin(connection: &Connection, slow: bool) {
|
pub(crate) fn stream_stdin(connection: Connection, slow: bool) {
|
||||||
warn!("This mode will break when using multi-byte characters and does not support ANSI escape sequences yet.");
|
warn!("This mode will break when using multi-byte characters and does not support ANSI escape sequences yet.");
|
||||||
let mut app = App {
|
let mut app = App {
|
||||||
connection,
|
connection,
|
||||||
|
@ -13,14 +13,14 @@ pub(crate) fn stream_stdin(connection: &Connection, slow: bool) {
|
||||||
app.run()
|
app.run()
|
||||||
}
|
}
|
||||||
|
|
||||||
struct App<'t> {
|
struct App {
|
||||||
connection: &'t Connection,
|
connection: Connection,
|
||||||
mirror: CharGrid,
|
mirror: CharGrid,
|
||||||
y: usize,
|
y: usize,
|
||||||
slow: bool,
|
slow: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'t> App<'t> {
|
impl App {
|
||||||
fn run(&mut self) {
|
fn run(&mut self) {
|
||||||
self.connection
|
self.connection
|
||||||
.send(Command::Clear)
|
.send(Command::Clear)
|
||||||
|
|
Loading…
Reference in a new issue