Last active
August 29, 2015 14:18
-
-
Save rvedotrc/60c82a21ca1c49da0fdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First, a script to ensure tmux is running how we like it: | |
$ cat start-tmux | |
#!/bin/bash | |
if ! tmux has-session -t irssi >/dev/null 2>&1 ; then | |
tmux -2 new-session -d -n irssi -s irssi irssi | |
fi | |
if ! tmux has-session -t irssi; then | |
echo "Failed to start irssi tmux session" | |
fi | |
Run it at boot time: | |
$ crontab -l | |
@reboot ./start-tmux 2>&1 | logger -t start-tmux | |
Auto-launch into that tmux session for interactive sessions, via ~/.profile: | |
if [ ! "${TMUX:-}" ] ; then | |
./start-tmux | |
tmux attach -t irssi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment