Gnu Screen Command from script?
Is there any way for a bash script running inside of screen to send a Screen Command? Ideally, I'm looking for a menu-type interface creator. Open up the interface and it presents a list of CLI progs. Select one and Screen splits the screen, resizes the top to just show a slim toolbar and runs the application in the bottom. When that app exits, it returns to normal.
Pseudocode: !/bin/sh screen -do "split" screen -do "resize 2" screen -do "focus" screen foobar.sh screen -do "eliminate bottom screen" screen -do should be replaced with the real way, if there is one. Any suggestions? |
Any suggestions?
"man screen" says "screen -X split" to execute say a split and this type of ops works inside screen as well but you may have to specify a session if you have multiple. Note that doing a "focus" doesn't focus the current pane but the other after which you need to create (login) to have a useable pane. If it's startup behaviour you may look into using a different screenrc to start with or use bindings. "man screen" for more info. |
Wow, thanks, I feel kinda silly knowing that the answer was in the manpage. I thought the commands referred to by -X were CLI apps like 'cd' or 'ls', didn't realize that meant screen commands. Okay well, thanks, that's exactly what I was looking for.
|
All times are GMT -5. The time now is 10:30 PM. |