Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect and use base-index and pane-base-index values #37

Merged
merged 28 commits into from
Apr 2, 2024

Conversation

ethagnawl
Copy link
Owner

This feature makes rmuxinator behave as expected when the user's base-index and/or pane-base-index values are values other than 0 (tmux's default).

Closes #21 and #25.

Makes obsolete #32 (kudos to @kjkeller, as I borrowed from their solution and it was very helpful in bringing me back up to speed).

@ethagnawl ethagnawl marked this pull request as draft March 26, 2024 16:47
@ethagnawl
Copy link
Owner Author

ethagnawl commented Mar 26, 2024

  • unify get_*_index methods
  • test/handle edge cases
  • write test(s)
  • normalize pane/base-index variable names
  • decide whether or not these values should live within config or similar meta config struct
  • fix window-name off-by-one bug (See below)

If the tmux server is configured to use a base-index greater than 0, the first window is named incorrectly.

Given the following config file:

name = "debug"
[[windows]]
  name = "one"
[[windows]]
  name = "two"

When base-index 0:

cargo run debug Foo.toml 
...
debug _window_name: "one"
tmux new-session -d -s debug -n one
tmux new-window -t debug:1 -n two
tmux -u attach-session -t debug

When base-index 1:

cargo run debug Foo.toml 
...
debug _window_name: "two"
tmux new-session -d -s debug -n two
tmux new-window -t debug:2 -n two
tmux -u attach-session -t debug

Pete Doherty added 22 commits March 26, 2024 16:01
…ux_command to detect tmux settings; modify run_tmux_command result -- WIP
… not being able to easily clone the mock instance as required by the application's use of Command
@ethagnawl ethagnawl self-assigned this Apr 2, 2024
@ethagnawl ethagnawl marked this pull request as ready for review April 2, 2024 15:32
@ethagnawl
Copy link
Owner Author

This will be included in an upcoming release -- probably 2.0.0.

@ethagnawl ethagnawl merged commit 8768644 into master Apr 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with base-index and pane-base-index when running Example.toml
1 participant