2 window-commands.c : irssi
4 Copyright (C) 2000 Timo Sirainen
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "module-formats.h"
31 #include "fe-windows.h"
32 #include "window-items.h"
33 #include "windows-layout.h"
34 #include "printtext.h"
36 static void window_print_binds(WINDOW_REC *win)
40 printformat_window(win, MSGLEVEL_CLIENTCRAP,
41 TXT_WINDOW_INFO_BOUND_ITEMS_HEADER);
42 for (tmp = win->bound_items; tmp != NULL; tmp = tmp->next) {
43 WINDOW_BIND_REC *bind = tmp->data;
45 printformat_window(win, MSGLEVEL_CLIENTCRAP,
46 TXT_WINDOW_INFO_BOUND_ITEM,
47 bind->name, bind->servertag,
48 bind->sticky ? "sticky" : "");
50 printformat_window(win, MSGLEVEL_CLIENTCRAP,
51 TXT_WINDOW_INFO_BOUND_ITEMS_FOOTER);
54 static void window_print_items(WINDOW_REC *win)
59 printformat_window(win, MSGLEVEL_CLIENTCRAP,
60 TXT_WINDOW_INFO_ITEMS_HEADER);
61 for (tmp = win->items; tmp != NULL; tmp = tmp->next) {
62 WI_ITEM_REC *item = tmp->data;
64 type = module_find_id_str("WINDOW ITEM TYPE", item->type);
65 printformat_window(win, MSGLEVEL_CLIENTCRAP,
67 type == NULL ? "??" : type,
69 item->server == NULL ? "" :
72 printformat_window(win, MSGLEVEL_CLIENTCRAP,
73 TXT_WINDOW_INFO_ITEMS_FOOTER);
76 static void cmd_window_info(WINDOW_REC *win)
80 printformat_window(win, MSGLEVEL_CLIENTCRAP,
81 TXT_WINDOW_INFO_HEADER);
83 /* Window reference number + sticky status */
84 if (!win->sticky_refnum) {
85 printformat_window(win, MSGLEVEL_CLIENTCRAP,
86 TXT_WINDOW_INFO_REFNUM, win->refnum);
88 printformat_window(win, MSGLEVEL_CLIENTCRAP,
89 TXT_WINDOW_INFO_REFNUM_STICKY, win->refnum);
93 if (win->name != NULL) {
94 printformat_window(win, MSGLEVEL_CLIENTCRAP,
95 TXT_WINDOW_INFO_NAME, win->name);
98 /* Window width / height */
99 printformat_window(win, MSGLEVEL_CLIENTCRAP, TXT_WINDOW_INFO_SIZE,
100 win->width, win->height);
102 /* Window immortality */
104 printformat_window(win, MSGLEVEL_CLIENTCRAP,
105 TXT_WINDOW_INFO_IMMORTAL);
108 /* Window history name */
109 if (win->history_name != NULL) {
110 printformat_window(win, MSGLEVEL_CLIENTCRAP,
111 TXT_WINDOW_INFO_HISTORY, win->history_name);
115 levelstr = win->level == 0 ?
116 g_strdup("NONE") : bits2level(win->level);
117 printformat_window(win, MSGLEVEL_CLIENTCRAP, TXT_WINDOW_INFO_LEVEL,
121 /* Active window server + sticky status */
122 if (win->servertag == NULL) {
123 printformat_window(win, MSGLEVEL_CLIENTCRAP,
124 TXT_WINDOW_INFO_SERVER,
125 win->active_server != NULL ?
126 win->active_server->tag : "NONE");
128 if (win->active_server != NULL &&
129 strcmp(win->active_server->tag, win->servertag) != 0)
130 g_warning("Active server isn't the sticky server!");
132 printformat_window(win, MSGLEVEL_CLIENTCRAP,
133 TXT_WINDOW_INFO_SERVER_STICKY,
137 /* Window theme + error status */
138 if (win->theme_name != NULL) {
139 printformat_window(win, MSGLEVEL_CLIENTCRAP,
140 TXT_WINDOW_INFO_THEME, win->theme_name,
141 win->theme != NULL ? "" : "(not loaded)");
144 /* Bound items in window */
145 if (win->bound_items != NULL)
146 window_print_binds(win);
149 if (win->items != NULL)
150 window_print_items(win);
152 signal_emit("window print info", 1, win);
154 printformat_window(win, MSGLEVEL_CLIENTCRAP,
155 TXT_WINDOW_INFO_FOOTER);
158 static void cmd_window(const char *data, void *server, WI_ITEM_REC *item)
160 while (*data == ' ') data++;
163 cmd_window_info(active_win);
164 else if (is_numeric(data, 0))
165 signal_emit("command window refnum", 3, data, server, item);
167 command_runsub("window", data, server, item);
170 /* SYNTAX: WINDOW NEW [hide] */
171 static void cmd_window_new(const char *data, void *server, WI_ITEM_REC *item)
176 g_return_if_fail(data != NULL);
178 type = (g_strncasecmp(data, "hid", 3) == 0 || g_strcasecmp(data, "tab") == 0) ? 1 :
179 (g_strcasecmp(data, "split") == 0 ? 2 : 0);
180 signal_emit("gui window create override", 1, GINT_TO_POINTER(type));
182 window = window_create(NULL, FALSE);
183 window_change_server(window, server);
186 /* SYNTAX: WINDOW CLOSE [<first> [<last>] */
187 static void cmd_window_close(const char *data)
189 GSList *tmp, *destroys;
191 int first_num, last_num;
194 if (!cmd_get_params(data, &free_arg, 2, &first, &last))
197 if ((*first != '\0' && !is_numeric(first, '\0')) ||
198 ((*last != '\0') && !is_numeric(last, '\0'))) {
199 cmd_params_free(free_arg);
203 first_num = *first == '\0' ? active_win->refnum : atoi(first);
204 last_num = *last == '\0' ? first_num : atoi(last);
206 /* get list of windows to destroy */
208 for (tmp = windows; tmp != NULL; tmp = tmp->next) {
209 WINDOW_REC *rec = tmp->data;
211 if (rec->refnum >= first_num && rec->refnum <= last_num)
212 destroys = g_slist_append(destroys, rec);
215 /* really destroy the windows */
216 while (destroys != NULL) {
217 WINDOW_REC *rec = destroys->data;
219 if (windows->next != NULL) {
223 printformat_window(rec, MSGLEVEL_CLIENTERROR,
224 TXT_WINDOW_IMMORTAL_ERROR);
228 destroys = g_slist_remove(destroys, rec);
231 cmd_params_free(free_arg);
234 /* SYNTAX: WINDOW REFNUM <number> */
235 static void cmd_window_refnum(const char *data)
239 if (!is_numeric(data, 0))
242 window = window_find_refnum(atoi(data));
244 window_set_active(window);
247 /* return the first window number with the highest activity */
248 static WINDOW_REC *window_highest_activity(WINDOW_REC *window)
250 WINDOW_REC *rec, *max_win;
252 int max_act, through;
254 g_return_val_if_fail(window != NULL, NULL);
256 max_win = NULL; max_act = 0; through = FALSE;
258 tmp = g_slist_find(windows, window);
259 for (;; tmp = tmp->next) {
265 if (through && tmp->data == window)
270 if (rec->data_level > 0 && max_act < rec->data_level) {
271 max_act = rec->data_level;
279 /* SYNTAX: WINDOW GOTO active|<number>|<name> */
280 static void cmd_window_goto(const char *data)
286 g_return_if_fail(data != NULL);
288 if (is_numeric(data, 0)) {
289 cmd_window_refnum(data);
293 if (!cmd_get_params(data, &free_arg, 1, &target))
296 if (g_strcasecmp(target, "active") == 0)
297 window = window_highest_activity(active_win);
299 window = window_find_item(active_win->active_server, target);
302 window_set_active(window);
304 cmd_params_free(free_arg);
307 /* SYNTAX: WINDOW NEXT */
308 static void cmd_window_next(void)
312 num = window_refnum_next(active_win->refnum, TRUE);
313 if (num < 1) num = windows_refnum_last();
315 window_set_active(window_find_refnum(num));
318 /* SYNTAX: WINDOW LAST */
319 static void cmd_window_last(void)
321 if (windows->next != NULL)
322 window_set_active(windows->next->data);
325 /* SYNTAX: WINDOW PREVIOUS */
326 static void cmd_window_previous(void)
330 num = window_refnum_prev(active_win->refnum, TRUE);
331 if (num < 1) num = window_refnum_next(0, TRUE);
333 window_set_active(window_find_refnum(num));
336 /* SYNTAX: WINDOW LEVEL [<level>] */
337 static void cmd_window_level(const char *data)
341 g_return_if_fail(data != NULL);
343 window_set_level(active_win, combine_level(active_win->level, data));
345 level = active_win->level == 0 ? g_strdup("NONE") :
346 bits2level(active_win->level);
347 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
348 TXT_WINDOW_LEVEL, level);
352 /* SYNTAX: WINDOW IMMORTAL on|off|toggle */
353 static void cmd_window_immortal(const char *data)
358 set = active_win->immortal;
359 else if (g_strcasecmp(data, "ON") == 0)
361 else if (g_strcasecmp(data, "OFF") == 0)
363 else if (g_strcasecmp(data, "TOGGLE") == 0)
364 set = !active_win->immortal;
366 printformat_window(active_win, MSGLEVEL_CLIENTERROR,
372 window_set_immortal(active_win, TRUE);
373 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
374 TXT_WINDOW_SET_IMMORTAL);
376 window_set_immortal(active_win, FALSE);
377 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
378 TXT_WINDOW_UNSET_IMMORTAL);
382 /* SYNTAX: WINDOW SERVER [-sticky | -unsticky] <tag> */
383 static void cmd_window_server(const char *data)
390 if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS,
391 "window server", &optlist, &tag))
394 if (*tag == '\0' && active_win->active_server != NULL &&
395 (g_hash_table_lookup(optlist, "sticky") != NULL ||
396 g_hash_table_lookup(optlist, "unsticky") != NULL)) {
397 tag = active_win->active_server->tag;
401 cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
402 server = server_find_tag(tag);
404 server = server_find_lookup_tag(tag);
406 if (g_hash_table_lookup(optlist, "unsticky") != NULL &&
407 active_win->servertag != NULL) {
408 g_free_and_null(active_win->servertag);
409 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
410 TXT_UNSET_SERVER_STICKY);
413 if (active_win->servertag != NULL &&
414 g_hash_table_lookup(optlist, "sticky") == NULL) {
415 printformat_window(active_win, MSGLEVEL_CLIENTERROR,
416 TXT_ERROR_SERVER_STICKY);
417 } else if (server == NULL) {
418 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
419 TXT_UNKNOWN_SERVER_TAG, tag);
420 } else if (active_win->active == NULL) {
421 window_change_server(active_win, server);
422 if (g_hash_table_lookup(optlist, "sticky") != NULL) {
423 g_free_not_null(active_win->servertag);
424 active_win->servertag = g_strdup(server->tag);
425 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
426 TXT_SET_SERVER_STICKY, server->tag);
428 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
430 server->tag, server->connrec->address,
431 server->connrec->chatnet == NULL ? "" :
432 server->connrec->chatnet);
435 cmd_params_free(free_arg);
438 static void cmd_window_item(const char *data, void *server, WI_ITEM_REC *item)
440 while (*data == ' ') data++;
442 if (is_numeric(data, '\0'))
443 signal_emit("command window item goto", 3, data, server, item);
445 command_runsub("window item", data, server, item);
448 /* SYNTAX: WINDOW ITEM PREV */
449 static void cmd_window_item_prev(void)
451 window_item_prev(active_win);
454 /* SYNTAX: WINDOW ITEM NEXT */
455 static void cmd_window_item_next(void)
457 window_item_next(active_win);
460 /* SYNTAX: WINDOW ITEM GOTO <number>|<name> */
461 static void cmd_window_item_goto(const char *data, SERVER_REC *server)
466 if (is_numeric(data, '\0')) {
467 /* change to specified number */
468 tmp = g_slist_nth(active_win->items, atoi(data)-1);
469 item = tmp == NULL ? NULL : tmp->data;
471 item = window_item_find_window(active_win, server, data);
475 window_item_set_active(active_win, item);
478 /* SYNTAX: WINDOW ITEM MOVE <number>|<name> */
479 static void cmd_window_item_move(const char *data, SERVER_REC *server,
486 if (!cmd_get_params(data, &free_arg, 1, &target))
489 if (is_numeric(target, '\0')) {
490 /* move current window item to specified window */
491 window = window_find_refnum(atoi(target));
493 /* move specified window item to current window */
494 item = window_item_find(server, target);
497 if (window != NULL && item != NULL)
498 window_item_set_active(window, item);
500 cmd_params_free(free_arg);
503 /* SYNTAX: WINDOW NUMBER [-sticky] <number> */
504 static void cmd_window_number(const char *data)
511 if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS,
512 "window number", &optlist, &refnum))
516 cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
520 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
523 window_set_refnum(active_win, num);
524 active_win->sticky_refnum =
525 g_hash_table_lookup(optlist, "sticky") != NULL;
528 cmd_params_free(free_arg);
531 /* SYNTAX: WINDOW NAME <name> */
532 static void cmd_window_name(const char *data)
536 win = window_find_name(data);
537 if (win == NULL || win == active_win)
538 window_set_name(active_win, data);
539 else if (active_win->name == NULL ||
540 strcmp(active_win->name, data) != 0) {
541 printformat_window(active_win, MSGLEVEL_CLIENTERROR,
542 TXT_WINDOW_NAME_NOT_UNIQUE, data);
546 /* SYNTAX: WINDOW HISTORY <name> */
547 void cmd_window_history(const char *data)
549 window_set_history(active_win, data);
552 /* we're moving the first window to last - move the first contiguous block
553 of refnums to left. Like if there's windows 1..5 and 7..10, move 1 to
554 11, 2..5 to 1..4 and leave 7..10 alone */
555 static void window_refnums_move_left(WINDOW_REC *move_window)
558 int refnum, new_refnum;
560 new_refnum = windows_refnum_last();
561 for (refnum = move_window->refnum+1; refnum <= new_refnum; refnum++) {
562 window = window_find_refnum(refnum);
563 if (window == NULL) {
568 window_set_refnum(window, refnum-1);
571 window_set_refnum(move_window, new_refnum);
574 /* we're moving the last window to first - make some space so we can use the
576 static void window_refnums_move_right(WINDOW_REC *move_window)
579 int refnum, new_refnum;
582 if (window_find_refnum(new_refnum) == NULL) {
583 window_set_refnum(move_window, new_refnum);
587 /* find the first unused refnum, like if there's windows
588 1..5 and 7..10, we only need to move 1..5 to 2..6 */
590 while (move_window->refnum == refnum ||
591 window_find_refnum(refnum) != NULL) refnum++;
594 while (refnum >= new_refnum) {
595 window = window_find_refnum(refnum);
596 window_set_refnum(window, refnum+1);
601 window_set_refnum(move_window, new_refnum);
604 /* SYNTAX: WINDOW MOVE PREV */
605 static void cmd_window_move_prev(void)
609 refnum = window_refnum_prev(active_win->refnum, FALSE);
611 window_set_refnum(active_win, refnum);
615 window_refnums_move_left(active_win);
618 /* SYNTAX: WINDOW MOVE NEXT */
619 static void cmd_window_move_next(void)
623 refnum = window_refnum_next(active_win->refnum, FALSE);
625 window_set_refnum(active_win, refnum);
629 window_refnums_move_right(active_win);
632 static void active_window_move_to(int new_refnum)
636 if (new_refnum > active_win->refnum) {
638 refnum = window_refnum_next(active_win->refnum, FALSE);
639 if (refnum == -1 || refnum > new_refnum)
642 window_set_refnum(active_win, refnum);
646 refnum = window_refnum_prev(active_win->refnum, FALSE);
647 if (refnum == -1 || refnum < new_refnum)
650 window_set_refnum(active_win, refnum);
655 /* SYNTAX: WINDOW MOVE FIRST */
656 static void cmd_window_move_first(void)
658 active_window_move_to(1);
661 /* SYNTAX: WINDOW MOVE LAST */
662 static void cmd_window_move_last(void)
664 active_window_move_to(windows_refnum_last());
667 /* SYNTAX: WINDOW MOVE <number>|<direction> */
668 static void cmd_window_move(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
670 if (!is_numeric(data, 0)) {
671 command_runsub("window move", data, server, item);
675 active_window_move_to(atoi(data));
678 /* SYNTAX: WINDOW LIST */
679 static void cmd_window_list(void)
681 GSList *tmp, *sorted;
684 sorted = windows_get_sorted();
685 printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_WINDOWLIST_HEADER);
686 for (tmp = sorted; tmp != NULL; tmp = tmp->next) {
687 WINDOW_REC *rec = tmp->data;
689 levelstr = bits2level(rec->level);
690 printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_WINDOWLIST_LINE,
691 rec->refnum, rec->name == NULL ? "" : rec->name,
692 rec->active == NULL ? "" : rec->active->visible_name,
693 rec->active_server == NULL ? "" : ((SERVER_REC *) rec->active_server)->tag,
697 g_slist_free(sorted);
698 printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_WINDOWLIST_FOOTER);
701 /* SYNTAX: WINDOW THEME [-delete] [<name>] */
702 static void cmd_window_theme(const char *data)
709 if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS,
710 "window theme", &optlist, &name))
713 if (g_hash_table_lookup(optlist, "delete") != NULL) {
714 g_free_and_null(active_win->theme_name);
716 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
717 TXT_WINDOW_THEME_REMOVED);
718 } else if (*name == '\0') {
719 if (active_win->theme == NULL) {
720 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
721 TXT_WINDOW_THEME_DEFAULT);
723 theme = active_win->theme;
724 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
726 theme->name, theme->path);
729 g_free_not_null(active_win->theme_name);
730 active_win->theme_name = g_strdup(data);
732 active_win->theme = theme = theme_load(data);
734 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
735 TXT_WINDOW_THEME_CHANGED,
736 theme->name, theme->path);
738 printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
739 TXT_THEME_NOT_FOUND, data);
743 cmd_params_free(free_arg);
746 static void cmd_layout(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
748 command_runsub("layout", data, server, item);
751 /* SYNTAX: FOREACH WINDOW <command> */
752 static void cmd_foreach_window(const char *data)
759 list = g_slist_copy(windows);
760 while (list != NULL) {
761 WINDOW_REC *rec = list->data;
764 signal_emit("send command", 3, data, rec->active_server,
766 list = g_slist_remove(list, list->data);
769 if (g_slist_find(windows, old) != NULL)
773 void window_commands_init(void)
775 command_bind("window", NULL, (SIGNAL_FUNC) cmd_window);
776 command_bind("window new", NULL, (SIGNAL_FUNC) cmd_window_new);
777 command_bind("window close", NULL, (SIGNAL_FUNC) cmd_window_close);
778 command_bind("window kill", NULL, (SIGNAL_FUNC) cmd_window_close);
779 command_bind("window server", NULL, (SIGNAL_FUNC) cmd_window_server);
780 command_bind("window refnum", NULL, (SIGNAL_FUNC) cmd_window_refnum);
781 command_bind("window goto", NULL, (SIGNAL_FUNC) cmd_window_goto);
782 command_bind("window previous", NULL, (SIGNAL_FUNC) cmd_window_previous);
783 command_bind("window next", NULL, (SIGNAL_FUNC) cmd_window_next);
784 command_bind("window last", NULL, (SIGNAL_FUNC) cmd_window_last);
785 command_bind("window level", NULL, (SIGNAL_FUNC) cmd_window_level);
786 command_bind("window immortal", NULL, (SIGNAL_FUNC) cmd_window_immortal);
787 command_bind("window item", NULL, (SIGNAL_FUNC) cmd_window_item);
788 command_bind("window item prev", NULL, (SIGNAL_FUNC) cmd_window_item_prev);
789 command_bind("window item next", NULL, (SIGNAL_FUNC) cmd_window_item_next);
790 command_bind("window item goto", NULL, (SIGNAL_FUNC) cmd_window_item_goto);
791 command_bind("window item move", NULL, (SIGNAL_FUNC) cmd_window_item_move);
792 command_bind("window number", NULL, (SIGNAL_FUNC) cmd_window_number);
793 command_bind("window name", NULL, (SIGNAL_FUNC) cmd_window_name);
794 command_bind("window history", NULL, (SIGNAL_FUNC) cmd_window_history);
795 command_bind("window move", NULL, (SIGNAL_FUNC) cmd_window_move);
796 command_bind("window move prev", NULL, (SIGNAL_FUNC) cmd_window_move_prev);
797 command_bind("window move next", NULL, (SIGNAL_FUNC) cmd_window_move_next);
798 command_bind("window move first", NULL, (SIGNAL_FUNC) cmd_window_move_first);
799 command_bind("window move last", NULL, (SIGNAL_FUNC) cmd_window_move_last);
800 command_bind("window list", NULL, (SIGNAL_FUNC) cmd_window_list);
801 command_bind("window theme", NULL, (SIGNAL_FUNC) cmd_window_theme);
802 command_bind("layout", NULL, (SIGNAL_FUNC) cmd_layout);
803 /* SYNTAX: LAYOUT SAVE */
804 command_bind("layout save", NULL, (SIGNAL_FUNC) windows_layout_save);
805 /* SYNTAX: LAYOUT RESET */
806 command_bind("layout reset", NULL, (SIGNAL_FUNC) windows_layout_reset);
807 command_bind("foreach window", NULL, (SIGNAL_FUNC) cmd_foreach_window);
809 command_set_options("window number", "sticky");
810 command_set_options("window server", "sticky unsticky");
811 command_set_options("window theme", "delete");
814 void window_commands_deinit(void)
816 command_unbind("window", (SIGNAL_FUNC) cmd_window);
817 command_unbind("window new", (SIGNAL_FUNC) cmd_window_new);
818 command_unbind("window close", (SIGNAL_FUNC) cmd_window_close);
819 command_unbind("window kill", (SIGNAL_FUNC) cmd_window_close);
820 command_unbind("window server", (SIGNAL_FUNC) cmd_window_server);
821 command_unbind("window refnum", (SIGNAL_FUNC) cmd_window_refnum);
822 command_unbind("window goto", (SIGNAL_FUNC) cmd_window_goto);
823 command_unbind("window previous", (SIGNAL_FUNC) cmd_window_previous);
824 command_unbind("window next", (SIGNAL_FUNC) cmd_window_next);
825 command_unbind("window last", (SIGNAL_FUNC) cmd_window_last);
826 command_unbind("window level", (SIGNAL_FUNC) cmd_window_level);
827 command_unbind("window immortal", (SIGNAL_FUNC) cmd_window_immortal);
828 command_unbind("window item", (SIGNAL_FUNC) cmd_window_item);
829 command_unbind("window item prev", (SIGNAL_FUNC) cmd_window_item_prev);
830 command_unbind("window item next", (SIGNAL_FUNC) cmd_window_item_next);
831 command_unbind("window item goto", (SIGNAL_FUNC) cmd_window_item_goto);
832 command_unbind("window item move", (SIGNAL_FUNC) cmd_window_item_move);
833 command_unbind("window number", (SIGNAL_FUNC) cmd_window_number);
834 command_unbind("window name", (SIGNAL_FUNC) cmd_window_name);
835 command_unbind("window history", (SIGNAL_FUNC) cmd_window_history);
836 command_unbind("window move", (SIGNAL_FUNC) cmd_window_move);
837 command_unbind("window move prev", (SIGNAL_FUNC) cmd_window_move_prev);
838 command_unbind("window move next", (SIGNAL_FUNC) cmd_window_move_next);
839 command_unbind("window move first", (SIGNAL_FUNC) cmd_window_move_first);
840 command_unbind("window move last", (SIGNAL_FUNC) cmd_window_move_last);
841 command_unbind("window list", (SIGNAL_FUNC) cmd_window_list);
842 command_unbind("window theme", (SIGNAL_FUNC) cmd_window_theme);
843 command_unbind("layout", (SIGNAL_FUNC) cmd_layout);
844 command_unbind("layout save", (SIGNAL_FUNC) windows_layout_save);
845 command_unbind("layout reset", (SIGNAL_FUNC) windows_layout_reset);
846 command_unbind("foreach window", (SIGNAL_FUNC) cmd_foreach_window);