Skip to content

Commit

Permalink
fix(komorebi): increase buffer size
Browse files Browse the repository at this point in the history
This commit increases the buffer size for messages received through the
named pipe registered with komorebi, reducing the number of instances
where partial messages cannot be deserialized correctly.
  • Loading branch information
LGUG2Z committed Aug 13, 2022
1 parent 3ad27b1 commit 2563820
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 44 deletions.
78 changes: 39 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "komokana"
version = "0.1.0"
version = "0.1.1"
authors = ["Jade Iqbal <[email protected]>"]
description = "A daemon that switches kanata keyboard layers in response to komorebi events"
categories = ["cli", "tiling-window-manager", "windows", "keyboard"]
Expand All @@ -25,6 +25,4 @@ serde_yaml = "0.9"

[dependencies.windows]
version = "0.39"
features = [
"Win32_UI_Input_KeyboardAndMouse",
]
features = ["Win32_UI_Input_KeyboardAndMouse"]
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl Komokana {
let config = self.configuration.clone();
let default_layer = self.default_layer.clone();
std::thread::spawn(move || -> Result<()> {
let mut buf = vec![0; 4096];
let mut buf = vec![0; 8192];

loop {
let mut named_pipe = pipe.lock();
Expand Down

0 comments on commit 2563820

Please sign in to comment.