mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Add a window swap operation (#899)
Swap the active window with the a neighboring column's active window. --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com> Take into account PR comments - no longer behave like an expel when a swap is made in a direction where there is no column to swap with - fix janky animation
This commit is contained in:
@@ -1240,6 +1240,8 @@ pub enum Action {
|
||||
ConsumeOrExpelWindowRightById(u64),
|
||||
ConsumeWindowIntoColumn,
|
||||
ExpelWindowFromColumn,
|
||||
SwapWindowLeft,
|
||||
SwapWindowRight,
|
||||
CenterColumn,
|
||||
CenterWindow,
|
||||
#[knuffel(skip)]
|
||||
@@ -1397,6 +1399,8 @@ impl From<niri_ipc::Action> for Action {
|
||||
}
|
||||
niri_ipc::Action::ConsumeWindowIntoColumn {} => Self::ConsumeWindowIntoColumn,
|
||||
niri_ipc::Action::ExpelWindowFromColumn {} => Self::ExpelWindowFromColumn,
|
||||
niri_ipc::Action::SwapWindowRight {} => Self::SwapWindowRight,
|
||||
niri_ipc::Action::SwapWindowLeft {} => Self::SwapWindowLeft,
|
||||
niri_ipc::Action::CenterColumn {} => Self::CenterColumn,
|
||||
niri_ipc::Action::CenterWindow { id: None } => Self::CenterWindow,
|
||||
niri_ipc::Action::CenterWindow { id: Some(id) } => Self::CenterWindowById(id),
|
||||
|
||||
Reference in New Issue
Block a user