aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-11-02 00:09:31 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-11-08 19:09:11 +0400
commiteb7d20c638e8912747ee21a4b8de95dd27bb7aba (patch)
tree521ed085c5340a4297f3c3ee98b7b191a95800ef /src/config.rs
parent195ca80c3959c35819ef33d84efd5970321b7614 (diff)
downloadniri-eb7d20c638e8912747ee21a4b8de95dd27bb7aba.tar.gz
niri-eb7d20c638e8912747ee21a4b8de95dd27bb7aba.tar.bz2
niri-eb7d20c638e8912747ee21a4b8de95dd27bb7aba.zip
Add action to switch layouts
Allow users to trigger layout change with custom bindings.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 1ad27ed7..ac1917bc 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -288,6 +288,7 @@ pub enum Action {
SwitchPresetColumnWidth,
MaximizeColumn,
SetColumnWidth(#[knuffel(argument, str)] SizeChange),
+ SwitchLayout(#[knuffel(argument)] LayoutAction),
}
#[derive(Debug, Clone, Copy, PartialEq)]
@@ -298,6 +299,12 @@ pub enum SizeChange {
AdjustProportion(f64),
}
+#[derive(knuffel::DecodeScalar, Debug, Clone, Copy, PartialEq)]
+pub enum LayoutAction {
+ Next,
+ Prev,
+}
+
#[derive(knuffel::Decode, Debug, PartialEq)]
pub struct DebugConfig {
#[knuffel(child, unwrap(argument), default = 1.)]