4 ms·
I often use idiosyncratic screen setups with very specifically-purposed windows. I support this behavior with a special config file that launches screen with c
by mcantor 17y ago
I often use idiosyncratic screen setups with very specifically-purposed windows. I support this behavior with a special config file that launches screen with certain windows pre-loaded for certain uses:
source /home/mcantor/.screenrc
chdir $SANDBOX/src
screen 0:svn
screen 1:lib
screen 2:nosetests
stuff "activate_environment\015"
screen 3:ipython
stuff "activate_environment\015ipython\015"
screen 4:
select 0
I use stuff because it's the most straightforward way to send commands with carriage returns (015 in octal) to a window.
I make this even more effortless by using a special alias in my .bashrc:
alias scd='screen -c /home/mcantor/.screenrc-dev'
I also use a few other aliases to support common uses:
alias scr='screen -rd'
alias scx='screen -x'
alias lsc='screen -list'
Also, don't forget the very useful -S switch:
screen -S someproject
Or, you can use Ctrl-a :sessionname, if you're already within a session, to rename it. That way, screen -list and screen -r can use your sessionnames, and you don't have to parse or remember the process ID's.