dotfiles/bin/tmux-pwn
2014-01-20 16:38:32 -05:00

5 lines
344 B
Bash
Executable file

#!/usr/bin/env bash
#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
tmux list-clients | sed "s:^\(/dev/\(ttys\|pts/\)[0-9]\+\).*\[\([0-9]\+x[0-9]\+\).*$:\3 \1:" | sort -r -n | cut -d " " -f 2 | xargs -n 1 tmux detach-client -t