Ah, I thought my script had lots of moving parts… nice :) The var expansion is 
interesting. I ended up using `tmux display-message -p …` to get things I 
needed in my script. It would be nice to have something like that. Are there 
plans to get that into tmux proper?  


On Thursday, February 21, 2013 at 10:16 PM, Thiago Padilha wrote:

> Since I wanted a 'lightweight' solution that I could carry arround
> with my dot-files, I ended up implementing a very simple shared
> key/value store using the zsh/net/socket module:
> https://github.com/tarruda/dot-files/blob/master/.zsh/tmux.d/shm_daemon.zsh
> https://github.com/tarruda/dot-files/blob/master/.zsh/tmux.d/common.zsh
> https://github.com/tarruda/dot-files/blob/master/.zsh/rc.d/tmux.zsh#L91-L92
>  
> The second file shows that every interactive shell started under tmux
> registers itself(if the daemon is not running it is started
> automatically). Also, a trap is set to ensure it is unregistered on
> exit, so when the daemon has no more clients it will exit/cleanup
> automatically.
>  
> The toogle pane code is here:
> https://github.com/tarruda/dot-files/blob/master/.zsh/tmux.d/toggle_pane.zsh
>  
> but the toggle script also depends on binding information set by this
> script, which does vim/tmux integration:
> https://github.com/tarruda/dot-files/blob/master/.zsh/tmux.d/vi.zsh.
>  
>  
> Those scripts are still very crude and have a good chance of crashing
> on you, but if you want to use anyway, then you need a patched
> tmux(thanks to Thomas Adam) that expands tmux variables when running
> 'tmux run-shell':
> https://github.com/tarruda/tmux/tree/1.7-run-shell-var-expansion(example
> usage: https://github.com/tarruda/dot-files/blob/master/.tmux.conf#L47-L49)
>  
>  
> If you dont use zsh or dont care about 'polluting' your session
> environment(which gets copied to each new pane/window), you can
> probably replace the shared memory stuff with tmux setenv/showenv.
>  
> On Thu, Feb 21, 2013 at 11:09 PM, Aaron Jensen <aaronjen...@gmail.com 
> (mailto:aaronjen...@gmail.com)> wrote:
> > I do something very similar, but take a slightly different approach. I think
> > of it as "zooming" in on a pane. So if I have a window set up, I'll zoom a
> > pane to break it out on its own, then return it to where it was. I got this
> > from the tmux book but adapted it to be more resilient to window/pane
> > switches.
> >  
> > https://github.com/aaronjensen/dotfiles/blob/master/bin/tmux-zoom
> > https://github.com/aaronjensen/dotfiles/blob/master/tmux.conf#L86-L88
> >  
> > I too am curious if there are better ways to do the things I'm doing. You
> > mentioned using a shared memory server, I'm not familiar w/ that, do you
> > have an example?
> >  
> > Thanks,
> >  
> > Aaron
> >  
> > On Thursday, February 21, 2013 at 4:33 PM, Thiago Padilha wrote:
> >  
> > Before tmux, I used to work gvim focused full screen and guake, a
> > terminal emulator for gnome that toggles on top of the screen when I
> > press a key. This lets me quickly access log output or type something
> > without even leaving vim(it actually is unfocused, but I'm still
> > seeing it on screen).
> >  
> > Currently, I'm achieving a similar workflow using tmux panes and
> > binding a keypress that will 'toggle' the pane with the terminal
> > in/out of the current window(it actually breaks the focused pane, and
> > if already detached, it is joined back). I use a shared memory server
> > to store state necessary to achieve this toggle effect by 'binding'
> > two panes toguether when one is broken out of the window.
> >  
> > Is there a more tmux-friendly way for me to achieve same or similar effect?
> >  
> > ------------------------------------------------------------------------------
> > Everyone hates slow websites. So do we.
> > Make your web apps faster with AppDynamics
> > Download AppDynamics Lite for free today:
> > http://p.sf.net/sfu/appdyn_d2d_feb
> > _______________________________________________
> > tmux-users mailing list
> > tmux-users@lists.sourceforge.net (mailto:tmux-users@lists.sourceforge.net)
> > https://lists.sourceforge.net/lists/listinfo/tmux-users
> >  
>  
>  
>  


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to