Skip to content

Instantly share code, notes, and snippets.

@Chouser
Created July 26, 2023 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chouser/f42683d747a6605f32346cd46462e783 to your computer and use it in GitHub Desktop.
Save Chouser/f42683d747a6605f32346cd46462e783 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Use this share-session script in your tmux config to ease multi-user pairing,
# like this:
# set-option -g status-interval 5
# set-option -g status-right '#(/home/chouser/repos/tmux-multiuser/share-session go+rwx go+rw) | "#{pane_title}" #(date +"%H:%M %d-%b-%Y")'
# Set socket dir and socket permissions
chmod "$1" "${TMUX%/*}"
chmod "$2" "${TMUX%%,*}"
# User list:
echo $(stat -c %U $(tmux list-clients -F '#{client_name}'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment