-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat,fix!: Resize, refresh improvements (#523)
Resolves #468. # Changes ## Breaking changes - `Session.new_window()` + `Window.split_window()`: No longer `attach` by default. Pass `attach=True` for the old behavior. - `Pane.resize_pane` renamed to `Pane.resize()` ## `Window.resize_window()`: Added If `Pane.resize_pane()` didn't work before, try resizing the window. ## `Pane.resize()`: Arguments added ## `Server.panes`: Fix listing of panes Would list only panes in attached session, rather than all in a server. ## `Window.refresh()` and `Pane.refresh()`: Refresh more underlying state ## `Obj._refresh`: Allow passing args e.g. `-a` (all) to `list-panes` and `list-windows`
- Loading branch information
Showing
16 changed files
with
525 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Constants | ||
|
||
```{eval-rst} | ||
.. automodule:: libtmux.constants | ||
:members: | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ servers | |
sessions | ||
windows | ||
panes | ||
constants | ||
common | ||
exceptions | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# flake8: NOQA: W605 | ||
"""Helper methods and mixins for libtmux. | ||
libtmux.common | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Constant variables for libtmux.""" | ||
import enum | ||
import typing as t | ||
|
||
|
||
class ResizeAdjustmentDirection(enum.Enum): | ||
"""Used for *adjustment* in ``resize_window``, ``resize_pane``.""" | ||
|
||
Up = "UP" | ||
Down = "DOWN" | ||
Left = "LEFT" | ||
Right = "RIGHT" | ||
|
||
|
||
RESIZE_ADJUSTMENT_DIRECTION_FLAG_MAP: t.Dict[ResizeAdjustmentDirection, str] = { | ||
ResizeAdjustmentDirection.Up: "-U", | ||
ResizeAdjustmentDirection.Down: "-D", | ||
ResizeAdjustmentDirection.Left: "-L", | ||
ResizeAdjustmentDirection.Right: "-R", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.