Hi Mark,
I use a shell call to bind 'k' to switch to the "penultimate" window:
bind k run-shell "tmux select-window -t $(echo #{session_stack} | awk -F,
'{w=$1}NF>=3{w=$3;exit}END{print w}')"
You could do any calculations you like using a similar method, I'm not sure
whether there are any more efficient built-in methods available.
Incidentally, isn't your "+1" example just the same as the next-window
command?
Regards,
Scott
On Tue, 7 Aug 2018 at 08:38, M Kelly <[email protected]> wrote:
> Hi,
>
> Thank you for awesome tmux.
> Is there a way to compute an expr for a select-window (or any tmux cmd) ?
> Something like:
>
> bind .... select-window -t $(('{#window_index}'+1))
>
> thx,
> mark
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.