Skip to content

Instantly share code, notes, and snippets.

@stuart-warren
Last active March 26, 2021 09:22
Embed
What would you like to do?
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