Created
March 1, 2023 12:27
-
-
Save sayan3296/794e9742e9af85987cb919c72a8d645f to your computer and use it in GitHub Desktop.
Script to log tmux sesstion output in a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To enable screen logging press: Ctrl + b followed by H | |
grep -q tmux.log 2>/dev/null ~/.tmux.conf || cat << _EOF >> ~/.tmux.conf | |
bind-key H pipe-pane -o "exec cat >>$HOME/'#W-tmux.log'" \; display-message 'Toggled logging to $HOME/#W-tmux.log' | |
_EOF | |
tmux new -s tmux-logged | |
Author
sayan3296
commented
Mar 1, 2023
- Make the script executable
- Execute it
- Hit Ctrl + b and then H to start logging the data
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment