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

target specific window with new panes #160

Open
kurktchiev opened this issue Dec 18, 2020 · 0 comments
Open

target specific window with new panes #160

kurktchiev opened this issue Dec 18, 2020 · 0 comments

Comments

@kurktchiev
Copy link

So I work with groups of servers and clusters and such and normally I have a dedicated window to handle those specific groups of splits.

Also, I tend to connect to multiple VPNs at the same time and have a dedicated VPN window that I send all of my vpn connections to, so I can easily check and track whats/where.

Here is an example of my VPN function that shows what I mean:

# Create a VPN creator for TMUX
# note that you want to work it as: tvpn "some vpn string #tag"
# where #tag will be used to name the newly created pane/split
function tvpn() {
  name=$(awk '{print $NF}' <<< "$@")
  if tmux list-windows | grep -qw "vpns"; then
    tmux split-pane -t vpns -v -p 80 $@
    tmux setw -t vpns pane-border-status bottom
    tmux setw -t vpns pane-border-format "$name"
  else
    tmux new-window -n vpns $@
    tmux setw -t vpns pane-border-status bottom
    tmux setw -t vpns pane-border-format "$name"
  fi
}

If you replace the VPN example above with servers, say routers or maybe k8s boxes, or whatever, you can see that grouping them up would be much simpler and faster than having random windows with some of them all over the place.

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

No branches or pull requests

1 participant