Skip to content

Instantly share code, notes, and snippets.

@djui
Created October 1, 2012 18:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save djui/3813504 to your computer and use it in GitHub Desktop.
Save djui/3813504 to your computer and use it in GitHub Desktop.
p0wn your tmux session
alias tmux-p0wn='tmux list-clients | sed "s|^\(/dev/ttys[0-9]\+\).*\[\([0-9]\+x[0-9]\+\).*$|\2 \1|" | sort -r -n | tail -n +2 | cut -d " " -f 2 | xargs -n 1 tmux detach-client -t'
@djui
Copy link
Author

djui commented Oct 1, 2012

An alias for your shell to quickly detach all clients with a smaller terminal resolution from the local session. If several clients have the same resolution, the youngest clients will be detached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment