diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-11-11 17:56:35 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-11-11 17:56:35 +0300 |
| commit | 97fe964e000ddff1f368726149a00de5b7681d50 (patch) | |
| tree | 0f8c04025f3ca63feef5e7d8e7f663695c426c66 | |
| parent | 9debb5db2385fd21c33ecc4b3c331ec3f6e8fbb4 (diff) | |
| download | niri-97fe964e000ddff1f368726149a00de5b7681d50.tar.gz niri-97fe964e000ddff1f368726149a00de5b7681d50.tar.bz2 niri-97fe964e000ddff1f368726149a00de5b7681d50.zip | |
Make consume-or-expel binds more prominent
I find myself using them much more than regular consume or expel.
| -rw-r--r-- | resources/default-config.kdl | 10 | ||||
| -rw-r--r-- | src/ui/hotkey_overlay.rs | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 6a89f1b1..e3f06f49 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -441,15 +441,17 @@ binds { // Switches focus between the current and the previous workspace. // Mod+Tab { focus-workspace-previous; } + // The following binds move the focused window in and out of a column. + // If the window is alone, they will consume it into the nearby column to the side. + // IF the window is already in a column, they will expel it out. + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + // Consume one window from the right into the focused column. Mod+Comma { consume-window-into-column; } // Expel one window from the focused column to the right. Mod+Period { expel-window-from-column; } - // There are also commands that consume or expel a single window to the side. - Mod+BracketLeft { consume-or-expel-window-left; } - Mod+BracketRight { consume-or-expel-window-right; } - Mod+R { switch-preset-column-width; } Mod+Shift+R { switch-preset-window-height; } Mod+Ctrl+R { reset-window-height; } diff --git a/src/ui/hotkey_overlay.rs b/src/ui/hotkey_overlay.rs index 719cbd3c..209e7dee 100644 --- a/src/ui/hotkey_overlay.rs +++ b/src/ui/hotkey_overlay.rs @@ -201,8 +201,8 @@ fn render( actions.extend(&[ &Action::SwitchPresetColumnWidth, &Action::MaximizeColumn, - &Action::ConsumeWindowIntoColumn, - &Action::ExpelWindowFromColumn, + &Action::ConsumeOrExpelWindowLeft, + &Action::ConsumeOrExpelWindowRight, ]); // Screenshot is not as important, can omit if not bound. @@ -376,8 +376,8 @@ fn action_name(action: &Action) -> String { Action::MoveWindowToWorkspaceUp => String::from("Move Window to Workspace Up"), Action::SwitchPresetColumnWidth => String::from("Switch Preset Column Widths"), Action::MaximizeColumn => String::from("Maximize Column"), - Action::ConsumeWindowIntoColumn => String::from("Consume Window Into Column"), - Action::ExpelWindowFromColumn => String::from("Expel Window From Column"), + Action::ConsumeOrExpelWindowLeft => String::from("Consume or Expel Window Left"), + Action::ConsumeOrExpelWindowRight => String::from("Consume or Expel Window Right"), Action::Screenshot => String::from("Take a Screenshot"), Action::Spawn(args) => format!( "Spawn <span face='monospace' bgcolor='#000000'>{}</span>", @@ -437,6 +437,8 @@ fn prettify_keysym_name(name: &str) -> String { "minus" => "-", "equal" => "=", "grave" => "`", + "bracketleft" => "[", + "bracketright" => "]", "Next" => "Page Down", "Prior" => "Page Up", "Print" => "PrtSc", |
