Hi, I do something vaguely similar; you could riff off of it and if others have a better suggestion, pipe up.
bind BSpace run-shell tmux-swap tmux-swap: #!/bin/sh tmuxcmd="tmux -Lmain" cur=$($tmuxcmd list-panes | grep "(active)" | cut -d':' -f1) if [[ $cur -eq 0 ]]; then $tmuxcmd select-pane -t :.- $tmuxcmd swap-pane -s 0 $tmuxcmd display-panes else $tmuxcmd swap-pane -s 0 -t $cur $tmuxcmd display-panes fi -p On Mon, Dec 20, 2010 at 05:15:00AM +0100, cies wrote: > dear reader, > > i think the conversation i had with NicM on irc explains about a > feature request that i want to make. > > feel free to comment on it with your ideas, i think it is a pretty > good idea and might easily become a feature loved by many. > > > > > 13:58 -!- Irssi: Join to #tmux was synced in 4 secs > 13:59 < cies> just started with tmux, already loving it! (will > proudly publish my .conf on github at some point) > 14:00 < cies> but i have a question that i want to raise here before i > might embarras myself on the mailing list > 14:01 < cies> can i make a repeat key (with repeat-time) for > last-window that brings me back in my window history > 14:01 < cies> (like pressing it twice for the window before the window > you where using before the window you use now > 14:01 < cies> ) > 14:02 < cies> bit like how alt-tab works for more WMs > 14:04 < cies> then the kill question (/feature wish): suchs a > repeatable command that also cycles through panes (if focus on those > has changed in between the changes). > 14:04 < cies> kill=killer > 14:06 < cies> for this second question i also raise in my quest to a > alt-tab mimicing thingy that can back-track my activity path of > windows > 14:09 < cies> if it is a feature request it could be "last-pane", > whereby it will also go to the "last pane" if that is (on) another > window > 14:10 < cies> this command should, ovbiously, be repeat ready and > might also take an integer argument > 14:11 < cies> im sure it will be a big help for the generation that > learn alt-tab before they learned about tmux (or screen and ancestors) > 14:13 < cies> needless to say i want to bind this new command to Tab > 14:15 < cies> (and if it takes and integer argument i will bind BTab > to "last-pane -n 2" -- unless there is a "undo-last-pane" command, > then i will bind that to BTab :-D > 14:25 < NicM> cies, last-window already goes back through the history > 14:25 < NicM> oh you mean go further back > 14:25 < cies> NicM: indeed > 14:26 < cies> mimicing alt-tabbish bahavoir > 14:26 < NicM> there is no reason it couldn't but there isn't a command to do > it > 14:26 < cies> NicM: i gues if not implemented yet another list needs > to be kept internally > 14:26 < NicM> the last-pane thing we don't keep the data for > 14:26 < NicM> but we could > 14:26 < NicM> the windows there is a stack of the last windows > 14:26 < cies> NicM: not a completely trivial thing but possible > 14:27 < cies> NicM: ok, so for windows alone there is > 14:27 < NicM> dunno why there needs to be a stack for windows > 14:27 < NicM> since there is no way to get beyond -1 > 14:27 < cies> NicM: but not exposed by commands right? > 14:27 < NicM> unless you kill the window > 14:28 < cies> NicM: cycling through panes and windows equally would > even be cooler right? > 14:28 < NicM> panes and windows equally could be done > 14:28 < NicM> panes and windows equally could be done > 14:28 < NicM> but sessions and windows would be harder > 14:29 < NicM> but yeah you could make a pane stack easily enough > 14:29 < cies> NicM: should i send this to a list? or would it be easy > for me to implement as a patch? > 14:29 < cies> NicM: tmux is c code i guess? > 14:29 < NicM> i think last-window should take an argument to go > further down the stack > 14:29 < NicM> well it depends how good your C is how easy it would be > to implement > 14:30 < cies> NicM: yes, AND it should be repeatable :) > 14:30 < NicM> a pane stack would be fine > 14:31 < NicM> since panes are only in 1 window right now > 14:31 < NicM> if you have a pane you also have its window > 14:31 < cies> ok > 14:31 < NicM> the problemw ould be if someone moved that window to > another session > 14:31 < NicM> you'd have to either remove it from the stack, or make > sure you skipped it > 14:32 < cies> it should just test for that and skip it > 14:32 < NicM> well you'd store the pane stack in the session > 14:32 < NicM> so you could just check the window the pane was in was > still in the session > 14:32 < cies> removing form the list would be nice if choose-pane was > to be implemented aswell > 14:33 < NicM> note there is a last-pane command in CVS HEAD > 14:33 < NicM> but it just behaves like last-window > 14:33 < cies> ok > 14:33 < cies> so the last-pane is already kept > 14:33 < NicM> but we can possibly remove that behaviour since yours > would be the same > 14:33 < NicM> or better > 14:33 < NicM> it'd be the same if the panes were in the same window > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users -- sic dicit magister P PhD Candidate Collaborative Programme in Ancient and Medieval Philosophy University of Toronto http://individual.utoronto.ca/peterjh ------------------------------------------------------------------------------ Forrester recently released a report on the Return on Investment (ROI) of Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even within 7 months. Over 3 million businesses have gone Google with Google Apps: an online email calendar, and document program that's accessible from your browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users