Skip to content

Instantly share code, notes, and snippets.

@qtip
Created September 30, 2013 18:44
Show Gist options
  • Save qtip/6768225 to your computer and use it in GitHub Desktop.
Save qtip/6768225 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from sh import tmux
curclient = tmux('display-message', p='#{client_tty}').strip()
clients = [line.split(':')[0] for line in tmux('list-clients')]
for client in clients:
if str(client) != str(curclient):
tmux('detach-client', t=client)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment