gardesk/garterm / 62b97ea

Browse files

feat: add default keybinds for fullscreen, reset, clear, resize

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
62b97ea88ac6a4b94c5fae6b55eb4435879946dd
Parents
3174120
Tree
f1c5023

1 changed file

StatusFile+-
M garterm/src/config/keybinds.rs 13 0
garterm/src/config/keybinds.rsmodified
@@ -39,6 +39,10 @@ impl Modifiers {
3939
     pub fn ctrl_alt() -> Self {
4040
         Self { ctrl: true, alt: true, ..Default::default() }
4141
     }
42
+
43
+    pub fn ctrl_shift_alt() -> Self {
44
+        Self { ctrl: true, shift: true, alt: true, ..Default::default() }
45
+    }
4246
 }
4347
 
4448
 impl std::fmt::Display for Modifiers {
@@ -305,6 +309,15 @@ impl KeybindSet {
305309
 
306310
         // Misc
307311
         set.add(Keybind::new(Modifiers::ctrl_shift(), "r", Action::ReloadConfig));
312
+        set.add(Keybind::new(Modifiers::none(), "f11", Action::ToggleFullscreen));
313
+        set.add(Keybind::new(Modifiers::ctrl_shift(), "delete", Action::ResetTerminal));
314
+        set.add(Keybind::new(Modifiers::ctrl_shift(), "k", Action::ClearScrollback));
315
+
316
+        // Pane resize (Ctrl+Shift+Alt+Arrow)
317
+        set.add(Keybind::new(Modifiers::ctrl_shift_alt(), "left", Action::ResizeLeft(5)));
318
+        set.add(Keybind::new(Modifiers::ctrl_shift_alt(), "right", Action::ResizeRight(5)));
319
+        set.add(Keybind::new(Modifiers::ctrl_shift_alt(), "up", Action::ResizeUp(5)));
320
+        set.add(Keybind::new(Modifiers::ctrl_shift_alt(), "down", Action::ResizeDown(5)));
308321
 
309322
         set
310323
     }