Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- tmux_sn=irc
- # Start tmux server if it isn't already running
- tmux start-server
- # Delete session if it already exists
- tmux kill-session -t $tmux_sn
- # Create session and initial windows
- tmux new-session -d -s $tmux_sn -n 'irssi (main)'
- tmux new-window -t $tmux_sn:1 -n 'Rei2'
- # Initial commands; exec zsh because the shell will be /bin/sh
- # (dash) when running as a cronjob
- tmux send-keys -t $tmux_sn:0 'exec zsh' C-m 'irssi -n shadowm_desktop' C-m
- tmux send-keys -t $tmux_sn:1 'exec zsh' C-m 'sudo -u rei2 irssi -n Rei2' C-m
- tmux select-window -t $tmux_sn:0
- # END
Advertisement
Add Comment
Please, Sign In to add comment