From 304317a86ed3a43ee03cae48e1d41edd653a3e0e Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 13 Feb 2025 20:05:28 +0100 Subject: [PATCH] fix pixels on inverts --- src/cli.rs | 12 +++++++++--- src/execute.rs | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index fa420d6..3ef2286 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -94,11 +94,17 @@ pub enum StreamCommand { about = "Pipe text to the display, example: `journalctl | servicepoint-cli stream stdin`" )] Stdin { - #[arg(long, short, default_value_t = false)] + #[arg( + long, + short, + default_value_t = false, + help = "Wait for a short amount of time before sending the next line" + )] slow: bool, }, #[clap(about = "Stream the default source to the display. \ - On Linux Wayland, this pops up a screen or window chooser, but it also may directly start streaming your main screen.")] + On Linux Wayland, this pops up a screen or window chooser, \ + but it also may directly start streaming your main screen.")] Screen { #[command(flatten)] options: StreamScreenOptions, @@ -107,7 +113,7 @@ pub enum StreamCommand { #[derive(clap::Parser, std::fmt::Debug, Clone)] pub struct StreamScreenOptions { - #[arg(long, short, default_value_t = false, help = "Disable dithering")] + #[arg(long, short, default_value_t = false, help = "Disable dithering - improves performance")] pub no_dither: bool, #[arg( diff --git a/src/execute.rs b/src/execute.rs index ad91eba..17ac5df 100644 --- a/src/execute.rs +++ b/src/execute.rs @@ -23,14 +23,14 @@ fn pixels(connection: &Connection, pixel_command: PixelCommand) { match pixel_command { PixelCommand::Off => pixels_reset(connection), PixelCommand::Invert => pixels_invert(connection), - PixelCommand::On => pixels_on(connection) + PixelCommand::On => pixels_on(connection), } } fn pixels_on(connection: &Connection) { let mask = BitVec::repeat(true, PIXEL_COUNT); connection - .send(Command::BitmapLinearXor(0, mask, CompressionCode::Lzma)) + .send(Command::BitmapLinear(0, mask, CompressionCode::Lzma)) .expect("could not send command") }