Never let it be said that I was afraid to try new things.
I’m slowly moving from screen to tmux — not for any lack of enthusiasm for the former, just because it’s important to find alternatives. 🙂
I like it. It picks up a lot of features that I wish were in screen — like the concept of panes, or being able to arrange a layout on startup. And switching between panes in tmux is far easier than screen’s tab cycles.
Some of it is still a little shaky though. And I really wish there was something equivalent to screen’s idle option, but I can’t find one.
Still, it keeps me busy. Perhaps sometime soon I shall find time to investigate Herbstluftwm, and move away from Musca. Gasp! 😯
Ah, but you can autolock tmux. From the man page:
Lock the session (like the lock-session command) after number seconds of inactivity, or the entire server (all sessions) if the lock-server option is set. The default is not to lock (set to 0).
Command to run when locking each client. The default is to run lock(1) with -np.
lock-server [on | off]
If this option is on (the default), instead of each session locking individually as each has been idle for lock-after-time, the entire server will lock after all sessions would have locked. This has no effect as a session option; it must be set
as a global option.
I knew if I just asked the Internet, someone would tell me how to do it. Thanks, Don and Matt. I’ll see if I can get this to funnel through my ordinary screensaver scripts. Cheers!
I am an enormous fan of Herbstluftwm so I think it is well worth a look. The use of bash makes it really easy to write hacky scripts to accomplish stuff, like piping window names to dmenu to make window switching easier.
Can’t you just set `lock-after-time` to the number of seconds you want `tmux` to wait and then `lock-command` to `cmatrix` or `pipes.sh` or whatever? This seems to work for me…
set -g lock-after-time 300
set -g lock-command /usr/local/bin/cmatrix
Good to see you’re finally ‘upgrading’ to tmux. Isn’t it nice to have a conf file that’s in plain English (rather than screen’s Klingon) for a change?
You wouldn’t mind sharing any guides that you may have followed while learning how to use tmux, would you?
Sure, but to be honest, I mostly stumbled around the man pages before settling on a default config that I liked.
I am sure there are some very good tutorials out there though. I should check; I am probably missing a lot of good information by virtue of my laziness. 😦
Here’s a very recent one: https://coderwall.com/p/_g2vpq
Thanks for the link! I was also able to find another site which helped out with the switch: https://mutelight.org/practical-tmux
Pingback: dtach: Beauty in sparsity | Inconsolation
Pingback: XaoS: Off to a good start | Inconsolation
Pingback: screen: The granddaddy of terminal multiplexers | Inconsolation
Pingback: scrollz: Fast, friendly and light | Inconsolation
Pingback: splitvt: Under the most dire of circumstances | Inconsolation