Re: screen session remember

2024-03-27 Thread Robin Lee Powell
tmux + https://github.com/tmux-plugins/tmux-resurrect + https://github.com/tmux-plugins/tmux-continuum is how I handle that. Which isn't really an answer to the question, but there it is. :) On Wed, Mar 13, 2024 at 08:46:30PM +0100, aotto wrote: > hi, thank you for providing the "screen" software

Re: screen session remember

2024-03-14 Thread Neal Fultz
Note that $WINDOW is the number when the process is created, vs `screen -Q` is at runtime - if/when you renumber windows they will no longer match. Maybe that's a bug you can live with, though. On Thu, Mar 14, 2024 at 12:18 AM aotto wrote: > Hi, thanks for this hint, I update your code > > # Scr

Re: screen session remember

2024-03-14 Thread aotto
Hi, thanks for this hint, I update your code # Screen only if [ -n "$STY" ] ; then     source ~/.screendb     SNUM=d$WINDOW     if [ -n "${!SNUM}" ] ; then     cd "${!SNUM}"     PROMPT_COMMAND="$PROMPT_COMMAND; sed -i 's!$SNUM=.*!$SNUM='\$(pwd)'!' ~/.screendb"     fi fi the "WINDOW" v

Re: screen session remember

2024-03-13 Thread Anton Sharonov
On Wed, Mar 13, 2024 at 03:26:56PM -0700, Neal Fultz wrote: > I would probably tackle this on the shell side rather than in .screenrc. > > For example, in ~/.bashrc, on startup, we can check what the number of the > screen is. And use PROMPT_COMMAND to update to the most recent eg using > sed. >

Re: screen session remember

2024-03-13 Thread Neal Fultz
I would probably tackle this on the shell side rather than in .screenrc. For example, in ~/.bashrc, on startup, we can check what the number of the screen is. And use PROMPT_COMMAND to update to the most recent eg using sed. # Screen only if [ -n "$STY" ] ; then d1=/home/nfultz/projects

Re: screen session remember

2024-03-13 Thread Anton Sharonov
On Wed, Mar 13, 2024 at 08:46:30PM +0100, aotto wrote: > I have a “screen session” with 10 screens and after > rebooting I want each screen (0-9) to start in the same > directory in which it was closed. Maybe not exactly what you are asking for, but you can hardcode your shells to curtain path on

Re: screen session remember

2024-03-13 Thread aotto
Thanks for the answer - this hint I already use. → but I would like to have a "replacement" which is always "up-to-time" On 13.03.24 22:01, Anton Sharonov wrote: On Wed, Mar 13, 2024 at 08:46:30PM +0100, aotto wrote: I have a “screen session” with 10 screens and after rebooting I want each scr

screen session remember

2024-03-13 Thread aotto
a simple question → I have a “screen session” with 10 screens and after rebooting I want each screen (0-9) to start in the same directory in which it was closed. mfg

screen session remember

2024-03-13 Thread aotto
hi, thank you for providing the "screen" software. My simple question → I have a “screen session” with 10 screens and after rebooting I want each screen (0-9) to start in the same directory in which it was closed. → all directories are local and in my HOME directory → there is no "change-us