Skip to content

Commit

Permalink
v2.0.0-rc.5
Browse files Browse the repository at this point in the history
  • Loading branch information
evnp committed Sep 3, 2023
1 parent 52018b3 commit 01b6108
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A lightweight tmux command & layout composer - one shell script + tmux + zero ot

**Contents** - [Usage](https://github.com/evnp/tmex#usage) | [Layout](https://github.com/evnp/tmex#layout) | [npm](https://github.com/evnp/tmex#npm) | [Install](https://github.com/evnp/tmex#install) | [Tests](https://github.com/evnp/tmex#tests) | [License](https://github.com/evnp/tmex#license)

**New in [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4)** 🐣 <br> [Multi-window management](https://github.com/evnp/tmex#multi-window-management-new-in-v200-rc3-) | [Focused-pane control](https://github.com/evnp/tmex#focused-pane-control-new-in-v200-rc3-) | [Multi-digit pane counts](https://github.com/evnp/tmex#multi-digit-pane-counts-new-in-v200-rc3-) | [Top-level sizing](https://github.com/evnp/tmex#top-level-layout-sizing-new-in-v200-rc3-) | [Grid sub-layouts](https://github.com/evnp/tmex#grid-sub-layouts-new-in-v200-rc3-)
**New in [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5)** 🐣 <br> [Multi-window management](https://github.com/evnp/tmex#multi-window-management-new-in-v200-rc3-) | [Focused-pane control](https://github.com/evnp/tmex#focused-pane-control-new-in-v200-rc3-) | [Multi-digit pane counts](https://github.com/evnp/tmex#multi-digit-pane-counts-new-in-v200-rc3-) | [Top-level sizing](https://github.com/evnp/tmex#top-level-layout-sizing-new-in-v200-rc3-) | [Grid sub-layouts](https://github.com/evnp/tmex#grid-sub-layouts-new-in-v200-rc3-)

If you'd like to jump straight to installing tmex, please go to the [Install](https://github.com/evnp/tmex#install) section or try one of these:
```sh
Expand Down Expand Up @@ -179,14 +179,14 @@ tmex your-session-name --layout={152}1[2{13}1]4{4112}
```
Note that the sublayout `[2{13}1]` is treated as a single column when sizing is applied, so that set of panes as a whole receives `5` as its width relative to the other columns.

Top-level layout sizing (new in [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4) 🐣)
Top-level layout sizing (new in [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5) 🐣)
----------------------------------------------------------------------------------------------------
Since a sizing clause like `{123}` always _follows_ a pane count number within a layout, you may be wondering how sizing could be applied to the "top level" columns (or rows) of a layout. For example, given the layout `234`, how could you:
- make the first column `2` fill half the screen
- make the second column `3` fill a third of the screen
- make the third column `4` fill the remainder (one sixth) of the screen

This special case is accomplished by placing the sizing clause at the _start_ of the layout (prior to [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4), this would result in an invalid layout error):
This special case is accomplished by placing the sizing clause at the _start_ of the layout (prior to [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5), this would result in an invalid layout error):
```sh
tmex your-session-name --layout={321}234
>>>
Expand All @@ -211,7 +211,7 @@ tmex your-session-name --layout=[[234]{321}] # also equivalent
```
These may be functionally equivalent, but they're a far cry from intuitive! Feel free to use whichever of the three forms makes the most logical sense to you though.

Grid sub-layouts (new in [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4) 🐣)
Grid sub-layouts (new in [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5) 🐣)
---------------------------------------------------------------------------------------------

Sometimes you might want a row/column of your layout to contain a grid of N panes, laid out using the default algorithm. This is done by placing `{+}` _after_ a number of panes in the layout. This can be thought of as "requesting a grid layout" for the preceeding number of panes – `+` is a visual mnemonic in that it separates the space within `{ }` in a grid-like formation.
Expand All @@ -238,7 +238,7 @@ tmex your-session-name --layout=31224
```
because `5{+}` is expanded to `122`, which is the default grid layout when 5 panes are required. You can experiment with commands such as `tmex your-session-name --layout=7{+}` to see what default grid layout is produced for each number of panes. In general, each default grid layout attempts to equalize pane sizes, widths, and heights as much as possible, keeping the largest pane on the left with odd numbers of panes.

Multi-digit pane counts (new in [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4) 🐣)
Multi-digit pane counts (new in [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5) 🐣)
----------------------------------------------------------------------------------------------------
For any of the layouts above, pane counts 10 and greater can be achieved by separating digits with `.` characters. For example:
```sh
Expand All @@ -262,7 +262,7 @@ tmex your-session-name --layout=11.[23]45[6.7]8.
```
`11.` is treated as multi-digit, and produces a column 11 panes. `23` are treated as a sublayout of single-digit pane counts, producing 5 panes total. `45` have no adjacent `.` characters so they produce columns of 4 and 5 panes. `6.7` are treated as multi-digit, but still produce separate rows (in their sublayout) of 6 and 7 panes respectively – the `.` has no effect. Finally, `8.` is treated as multi-digit due to the adjacent `.` but still produces a column of 8 panes – the `.` has no effect).

Focused Pane Control (new in [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4) 🐣)
Focused Pane Control (new in [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5) 🐣)
-------------------------------------------------------------------------------------------------

There are a few different ways to select a specific pane to be "focused" – with cursor active inside it – when your layout is initialized.
Expand Down Expand Up @@ -292,7 +292,7 @@ tmex your-session-name -f=-10 1357 # shorthand argument + shorthand
# this happens to be equivalent to --layout=135---7 from above
```

Multi-window management (new in [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4) 🐣)
Multi-window management (new in [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5) 🐣)
----------------------------------------------------------------------------------------------------

You may want to create multiple tmux windows within your tmux session, and navigate between them using **CTRL+B→N** (next), **CTRL+B→P** (previous), **CTRL+B→[0-9]** (select by index).
Expand All @@ -319,7 +319,7 @@ tmex your-session-name --window '' 123 --window '' 44 # equivalent
```
**NOTE** that `-w''` (no space between arg and value) does _not_ work, since shell string concatenation causes this to be treated as simply `-w` and the _next_ arg will be inadvertently used as the window name.

Kill command (new in [v2.0.0-rc.4](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.4) 🐣)
Kill command (new in [v2.0.0-rc.5](https://github.com/evnp/tmex/releases/tag/v2.0.0-rc.5) 🐣)
---------------------------------------------------------------------------------------------

You can kill a tmux session from anywhere using
Expand Down Expand Up @@ -382,11 +382,11 @@ read -rp $'\n'"Current \$MANPATH:"$'\n'"${MANPATH//:/ : }"$'\n\n'"Enter a direct
Verify installation:
```sh
tmex -v
==> tmex 2.0.0-rc.4
==> tmex 2.0.0-rc.5

brew test tmex
==> Testing tmex
==> /opt/homebrew/Cellar/tmex/2.0.0-rc.4/bin/tmex test --print 1234 hello world
==> /opt/homebrew/Cellar/tmex/2.0.0-rc.5/bin/tmex test --print 1234 hello world
```

If you see the output `Warning: tmux is not yet installed, tmex will not work without tmux.` you'll need to install tmux as well.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tmex",
"version": "2.0.0-rc.4",
"version": "2.0.0-rc.5",
"description": "tmux-execute – a lightweight tmux command & layout composer",
"main": "tmex",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion tmex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# tmex 2.0.0-rc.4
# tmex 2.0.0-rc.5

set -euo pipefail

Expand Down

0 comments on commit 01b6108

Please sign in to comment.