aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-11-15 09:38:50 -0800
committerJoe Wilm <joe@jwilm.com>2016-11-17 17:17:54 -0800
commitd97996e19de6856c23c51d05ec10f10db41e309d (patch)
tree80e43240687249f5062bcd16d64492ae32b0625d /src/main.rs
parentcb2bc4eadd3d149fcae4d1b552be47bc5a9413d8 (diff)
downloadalacritty-d97996e19de6856c23c51d05ec10f10db41e309d.tar.gz
alacritty-d97996e19de6856c23c51d05ec10f10db41e309d.zip
Make bindings configurable from alacritty.yml
Bindings were previously hardcoded within input.rs; adding, removing, or changing a binding required a recompile! Now, bindings may be declared in alacritty.yml. Even better, bindings are live-reloaded when alacritty.yml is changed! One unexpected benefit of this change was that all of the special casing in input.rs has disappeared. Conversely, config.rs has gained complexity for all of the deserialization logic. Resolves #3.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 38ecde39..ad8cfed9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -233,7 +233,8 @@ fn main() {
let mut processor = event::Processor::new(
input::LoopNotifier(loop_tx),
terminal.clone(),
- tx
+ tx,
+ &config
);
let (config_tx, config_rx) = mpsc::channel();
@@ -253,6 +254,7 @@ fn main() {
if let Ok(config) = config_rx.try_recv() {
display.update_config(&config);
+ processor.update_config(&config);
}
// Maybe draw the terminal