LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Gnu Screen Commands (https://www.linuxquestions.org/questions/linux-software-2/gnu-screen-commands-509577/)

PatrickNew 12-11-2006 10:32 PM

Gnu Screen Commands
 
Screen is once again probably going to take part in my effort to extend the battery life on my laptop by switching to a console environment. (Letting me keep my cpufreq low.) So, here's my question I know you can start Screen already running a shell command, but is there any way to have it auto-execute a number of screen-commands at startup? Specifically:

C-a S //split the screen
C-a : Resize 1 //reduce the top to height 1
C-a Tab //switch to bottom
C-a c //put a screen shell in the bottom

I would combine this with a initially running bash script (in the top) that provides me with battery charge, time, network status, and current weather information. <gloat>Yep, wrote that myself (still working on the weather)</gloat> I felt like I can easily do without most gui tools for occasional laptop use (still would love some form of CLI word processor), but that I'd miss having an always on reminder of the time, batt, etc.

Also, is there a way to not have the "hardstatus" bar separating the windows? I tried adding "hardstatus off" to my screenrc, but to no avail. Alternatively, is there a way to use it to output arbitrary text, updatably? I could try to write some app to use it as the time etc. display. Thanks for all your help.

blackhole54 12-15-2006 11:29 AM

The following instructions at the end of your ~/.screenrc file should do it. Replace /home/user/dummy with the path & name of your script.


Code:

split
screen /home/user/dummy
resize 1
focus
screen

If you don't want to commit to using this on all invocations of screen, you can create a special configuration file that you invoke using the -c option.

I have no idea how to help you with your hardstatus problem.

PatrickNew 12-15-2006 05:23 PM

thanks a bunch!


All times are GMT -5. The time now is 08:25 AM.