Skip to content

target specific window with new panes #160

Open
@kurktchiev

Description

@kurktchiev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions