From 06bcd06a17be3bd242e2b8230dd9b803b1969f3c Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Thu, 21 May 2026 15:17:37 +0300 Subject: feat: use local keybindings for remote attach --- src/config/keybinds.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/config/keybinds.rs') diff --git a/src/config/keybinds.rs b/src/config/keybinds.rs index 3a4cf754..1c9c491b 100644 --- a/src/config/keybinds.rs +++ b/src/config/keybinds.rs @@ -1,7 +1,7 @@ #[cfg(test)] use crossterm::event::KeyEvent; use crossterm::event::{KeyCode, KeyModifiers}; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; use tracing::warn; use super::Config; @@ -9,13 +9,13 @@ use crate::input::TerminalKey; pub type KeyCombo = (KeyCode, KeyModifiers); -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct LiveKeybindConfig { pub prefix: KeyCombo, pub keybinds: Keybinds, } -#[derive(Debug, Clone, PartialEq, Eq, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] #[serde(untagged)] pub enum BindingConfig { One(String), @@ -45,7 +45,7 @@ impl BindingConfig { } } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Default)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize, Default)] #[serde(rename_all = "snake_case")] pub enum CommandKeybindType { #[default] @@ -53,7 +53,7 @@ pub enum CommandKeybindType { Pane, } -#[derive(Debug, Clone, Deserialize)] +#[derive(Debug, Clone, Deserialize, Serialize)] #[serde(default)] pub struct CommandKeybindConfig { /// Key that runs a command. Use `prefix+g` for prefix mode or a modified chord for direct mode. -- cgit v1.2.3