Re: change notification style in status bar

2010-04-18 Thread Nicholas Marriott
Hi

I'll add it to the todo list.


On Wed, Apr 14, 2010 at 10:25:26AM +, Martin Roecker wrote:
> Hi,
> 
> I haven't found a possibility to change the way of how window activitiy
> is notivied in the statusbar. I want to define foreground and background
> colors manually, instead of only having the current colors inverted. Is
> this possible?
> 
> thanks!
> 
> Martin
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: find-window across sessions?

2010-04-18 Thread Nicholas Marriott
Not at the moment, we could add a flag to find-window, although perhaps
some thought needs to be put into how the UI should work for all
commands across sessions - it is clear that switching sessions without
detaching is becoming a common idiom so there might be other ways we can
make it easier.

Someone else has already requested eg next/previous session.

I'll add it to the todo list.


On Mon, Apr 12, 2010 at 09:14:05AM +0100, David Chanters wrote:
> Hi all,
> 
> I use tmux as my login shell, and as such i often find myself working
> across different sessions without even realising it.
> 
> I really like the find-window command -- but is there a way of making
> this work across sessions?
> 
> What I'd imagine it doing is invoking the find-window command in one
> session, and as part of the choose-window list, would then optionally
> switch to that session on choosing a window in a different session.
> 
> Is this possible?
> 
> TIA,
> 
> David
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: [patch] support for a tiled layout

2010-04-18 Thread Nicholas Marriott
Hi

I tweaked this a bit, think it fixes the problems, does this seem okay,
please test.


Index: cmd-select-layout.c
===
RCS file: /cvs/src/usr.bin/tmux/cmd-select-layout.c,v
retrieving revision 1.8
diff -u -p -r1.8 cmd-select-layout.c
--- cmd-select-layout.c 3 Dec 2009 22:50:10 -   1.8
+++ cmd-select-layout.c 18 Apr 2010 08:35:07 -
@@ -59,6 +59,9 @@ cmd_select_layout_init(struct cmd *self,
case ('4' | KEYC_ESCAPE):
data->arg = xstrdup("main-vertical");
break;
+   case ('5' | KEYC_ESCAPE):
+   data->arg = xstrdup("tiled");
+   break;
}
 }
 
Index: key-bindings.c
===
RCS file: /cvs/src/usr.bin/tmux/key-bindings.c,v
retrieving revision 1.19
diff -u -p -r1.19 key-bindings.c
--- key-bindings.c  6 Apr 2010 21:35:44 -   1.19
+++ key-bindings.c  18 Apr 2010 08:35:07 -
@@ -151,6 +151,7 @@ key_bindings_init(void)
{ '2' | KEYC_ESCAPE,  0, &cmd_select_layout_entry },
{ '3' | KEYC_ESCAPE,  0, &cmd_select_layout_entry },
{ '4' | KEYC_ESCAPE,  0, &cmd_select_layout_entry },
+   { '5' | KEYC_ESCAPE,  0, &cmd_select_layout_entry },
{ KEYC_PPAGE, 0, &cmd_copy_mode_entry },
{ 'n' | KEYC_ESCAPE,  0, &cmd_next_window_entry },
{ 'o' | KEYC_ESCAPE,  0, &cmd_rotate_window_entry },
Index: layout-set.c
===
RCS file: /cvs/src/usr.bin/tmux/layout-set.c,v
retrieving revision 1.5
diff -u -p -r1.5 layout-set.c
--- layout-set.c3 Feb 2010 22:24:34 -   1.5
+++ layout-set.c18 Apr 2010 08:35:07 -
@@ -31,6 +31,7 @@ void  layout_set_even_h(struct window *);
 void   layout_set_even_v(struct window *);
 void   layout_set_main_h(struct window *);
 void   layout_set_main_v(struct window *);
+void   layout_set_tiled(struct window *);
 
 const struct {
const char  *name;
@@ -40,6 +41,7 @@ const struct {
{ "even-vertical", layout_set_even_v },
{ "main-horizontal", layout_set_main_h },
{ "main-vertical", layout_set_main_v },
+   { "tiled", layout_set_tiled },
 };
 
 const char *
@@ -437,6 +439,105 @@ layout_set_main_v(struct window *w)
if (w->sx > used) {
lccolumn = TAILQ_LAST(&lc->cells, layout_cells);
layout_resize_adjust(lccolumn, LAYOUT_LEFTRIGHT, w->sx - used);
+   }
+
+   /* Fix cell offsets. */
+   layout_fix_offsets(lc);
+   layout_fix_panes(w, w->sx, w->sy);
+
+   layout_print_cell(w->layout_root, __func__, 1);
+
+   server_redraw_window(w);
+}
+
+void
+layout_set_tiled(struct window *w)
+{
+   struct window_pane  *wp;
+   struct layout_cell  *lc, *lcrow, *lcchild;
+   u_intn, width, height, used;
+   u_inti, j, columns, rows;
+
+   layout_print_cell(w->layout_root, __func__, 1);
+
+   /* Get number of panes. */
+   n = window_count_panes(w);
+   if (n <= 1)
+   return;
+
+   /* How many rows and columns are wanted? */
+   rows = columns = 1;
+   while (rows * columns < n) {
+   rows++;
+   if (rows * columns < n)
+   columns++;
+   }
+
+   /* What width and height should they be? */
+   width = w->sx / columns;
+   if (width < PANE_MINIMUM + 1)
+   width = PANE_MINIMUM + 1;
+   height = w->sy / rows;
+   if (width < PANE_MINIMUM + 1)
+   width = PANE_MINIMUM + 1;
+
+   /* Free old tree and create a new root. */
+   layout_free(w);
+   lc = w->layout_root = layout_create_cell(NULL);
+   layout_set_size(lc, width * columns, height * rows, 0, 0);
+   layout_make_node(lc, LAYOUT_TOPBOTTOM);
+
+   /* Create a grid of the cells. */
+   wp = TAILQ_FIRST(&w->panes);
+   for (j = 0; j < rows; j++) {
+   /* If this is the last cell, all done. */
+   if (wp == NULL)
+   break;
+
+   /* Create the new row. */
+   lcrow = layout_create_cell(lc);
+   layout_set_size(lcrow, w->sx, height - 1, 0, 0);
+   TAILQ_INSERT_TAIL(&lc->cells, lcrow, entry);
+
+   /* If only one column, just use the row directly. */
+   if (n - (j * columns) == 1) {
+   layout_make_leaf(lcrow, wp);
+   wp = TAILQ_NEXT(wp, entry);
+   continue;
+   }
+
+   /* Add in the columns. */
+   layout_make_node(lcrow, LAYOUT_LEFTRIGHT);
+   for (i = 0; i < columns; i++) {
+   /* Create and add a pane cell. */
+   lcchild = layout_create_cell(lc