tmux run command on idle

Sup all

so i finally decided to have a command run every time my terminal goes idle. after some searching, here is what i have come up with:
lock-after-time && lock-command

from the man pages:

lock-after-time number
        Lock the session (like the lock-session command) after number seconds of inactivity.  The default is not to lock (set to 0).
lock-command shell-command
        Command to run when locking each client.  The default is to run lock(1) with -np.

so in my .tmux.rc :

set -g lock-after-time 360
set -g lock-command "/usr/bin/asciiquarium"

asciiquarium is set to start after 6 minutes.

«
»

    Leave a Reply

    Your email address will not be published. Required fields are marked *