On Fri, Oct 10, 2008 at 02:42:10AM -0700, Donald Chai wrote: > > On Oct 10, 2008, at 1:36 AM, Marc Andre Tanner wrote: > >> On Wed, Oct 08, 2008 at 05:44:31PM -0700, Donald Chai wrote: >>> On Wed, Oct 8, 2008 at 4:44 PM, Charlie Kester >>> <[EMAIL PROTECTED]> wrote: >>>> I assume the question concerns the new scripting support in dvtm. >>>> >>>> Originally I was excited by the addition of this feature and >>>> downloaded >>>> the tip right away. >>>> >>>> But since then, I've scarcely used it. >>>> So I won't object if the default is to leave it disabled. >>> >>> Maybe if there were a list of sample scripts... The only usage that I >>> can think of is to have VIM open a manpage in a new window using the >>> 'K' key, as opposed to in the same window. >> >> I agree that the main usage is opening new windows. For example when >> mutt displays an email which contains a url it could launch a text >> browser in a new window. >> >> I was also asked if there is a way to detect whether the shell startup >> script is running within dvtm. So i might introduce an envrionment >> variable DVTM which contains the current version. > > Or the PID of the innermost dvtm instance? > > GNU screen lets me run commands without me having to specify a FIFO. I > just run "screen -X <cmd>". It seems they use variables PPID and STY.
As far as i can see GNU screen just creates the fifos in /var/run/screen/*/* if you have multiple session running you have to specify the session with -S. I don't think this is better than the current dvtm behaviour. Also why use "screen -S session -X cmd" if you could "echo cmd > fifo"? Anyway the DVTM variable would just be to detect dvtm. So you could write a shell startup script which contains. [ ! -z $DVTM ] && dvtm-startup-script Marc -- Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
