Skip to content

Instantly share code, notes, and snippets.

@stuart-warren
Last active March 26, 2021 09:22
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 stuart-warren/c2010e7b3e5e102ef99e5cbdee6b3185 to your computer and use it in GitHub Desktop.
Save stuart-warren/c2010e7b3e5e102ef99e5cbdee6b3185 to your computer and use it in GitHub Desktop.
tmux keylogger notes
tmux set-option status 2
tmux set -g status-interval 1
tmux set-option -g 'status-format[1]' "#[fg=red,bg=default]#(uptime | awk '{print $3}'|sed 's/,//') #[fg=blue]%a%d-%m-%Y %H:%M:%S"

tmux bind-key -n "$bindkey" run-shell "$callback_cmd" '\;' send-keys "$sendkey";
  • update running tmux config to have all keypresses run a command and send-key
  • command will write keypress to a file
  • update 2nd line of status bar

tmux status will run command to grab most recent n keys pressed, limited to some size

@stuart-warren
Copy link
Author

tmux set-option status on to revert to 1 line

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