shadowm

Untitled

Sep 21st, 2013
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.59 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. tmux_sn=irc
  4.  
  5. # Start tmux server if it isn't already running
  6. tmux start-server
  7.  
  8. # Delete session if it already exists
  9. tmux kill-session -t $tmux_sn
  10.  
  11. # Create session and initial windows
  12. tmux new-session -d -s $tmux_sn -n 'irssi (main)'
  13. tmux new-window -t $tmux_sn:1 -n 'Rei2'
  14.  
  15. # Initial commands; exec zsh because the shell will be /bin/sh
  16. # (dash) when running as a cronjob
  17. tmux send-keys -t $tmux_sn:0 'exec zsh' C-m 'irssi -n shadowm_desktop' C-m
  18. tmux send-keys -t $tmux_sn:1 'exec zsh' C-m 'sudo -u rei2 irssi -n Rei2' C-m
  19.  
  20. tmux select-window -t $tmux_sn:0
  21.  
  22. # END
Advertisement
Add Comment
Please, Sign In to add comment