by zzalpha · 10y ago · 0 comments
"Daemon mode" is the mode for tmux, and the whole stack is designed to be extremely scriptable. "tmux send-keys" does what you're referring to, here, but essentially anything you can do interactively, you can do via the command-line.
Not to say you shouldn't just keep doing what works for you! But figured I'd at least make mention of tmux as an alternative... I'm a fan. :)
Since I use screen fairly often, it had never occurred to me (until fairly recently) that you can rely on it to start with a machine reboot -- and yet have the very familiar interface available to you when you want to intervene. Something to be said about muscle memory.
And yet, this is a default shortcut for command mode in tmux. "But you can configure it!" — one might say. No, I won't be doing it on every system I manage, I have better things to do.
It all started with less(1)... Configuring it is a pain in the butt. One day, I couldn't remember how to do it on a new machine, so I just performed the following command...
scp ~/.*less* ~/*less* newmachine:
It was wonderful! Now I do the same thing for my emacs config, and my .xsession, and my hosts files, etc.