Function to swap active window with another
This commit is contained in:
parent
f9944e6140
commit
c06823dd47
@ -567,6 +567,13 @@ class Tab: # {{{
|
|||||||
if self.current_layout.move_window_to_group(self.windows, neighbor):
|
if self.current_layout.move_window_to_group(self.windows, neighbor):
|
||||||
self.relayout()
|
self.relayout()
|
||||||
|
|
||||||
|
def swap_active_window_with(self, window_id: int) -> None:
|
||||||
|
group = self.windows.group_for_window(window_id)
|
||||||
|
if group is not None:
|
||||||
|
w = self.active_window
|
||||||
|
if w is not None and w.id != window_id:
|
||||||
|
self.current_layout.move_window_to_group(self.windows, group.id)
|
||||||
|
|
||||||
@ac('win', 'Move active window to the top (make it the first window)')
|
@ac('win', 'Move active window to the top (make it the first window)')
|
||||||
def move_window_to_top(self) -> None:
|
def move_window_to_top(self) -> None:
|
||||||
n = self.windows.active_group_idx
|
n = self.windows.active_group_idx
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user