mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 17:23:15 +02:00
core: add option "-o" for command /color
This commit is contained in:
@@ -748,6 +748,23 @@ gui_color_buffer_display_timer ()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Put info about terminal and colors in buffer: $TERM, COLORS, COLOR_PAIRS,
|
||||
* can_change_color.
|
||||
*/
|
||||
|
||||
void
|
||||
gui_color_info_term_colors (char *buffer, int size)
|
||||
{
|
||||
snprintf (buffer, size,
|
||||
"$TERM=%s COLORS: %d, COLOR_PAIRS: %d, "
|
||||
"can_change_color: %s",
|
||||
getenv ("TERM"),
|
||||
gui_color_term_colors,
|
||||
gui_color_term_color_pairs,
|
||||
(gui_color_term_can_change_color) ? "yes" : "no");
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays content of color buffer.
|
||||
*/
|
||||
@@ -774,13 +791,8 @@ gui_color_buffer_display ()
|
||||
|
||||
/* display terminal/colors infos */
|
||||
y = 0;
|
||||
gui_chat_printf_y (gui_color_buffer, y++,
|
||||
"$TERM=%s COLORS: %d, COLOR_PAIRS: %d, "
|
||||
"can_change_color: %s",
|
||||
getenv ("TERM"),
|
||||
gui_color_term_colors,
|
||||
gui_color_term_color_pairs,
|
||||
(gui_color_term_can_change_color) ? "yes" : "no");
|
||||
gui_color_info_term_colors (str_line, sizeof (str_line));
|
||||
gui_chat_printf_y (gui_color_buffer, y++, "%s", str_line);
|
||||
|
||||
/* display palette of colors */
|
||||
y++;
|
||||
|
||||
@@ -185,6 +185,7 @@ extern int gui_color_get_term_colors ();
|
||||
extern const char *gui_color_get_name (int num_color);
|
||||
extern void gui_color_init_weechat ();
|
||||
extern void gui_color_display_terminal_colors ();
|
||||
extern void gui_color_info_term_colors (char *buffer, int size);
|
||||
extern void gui_color_buffer_display ();
|
||||
extern void gui_color_switch_colors ();
|
||||
extern void gui_color_reset_pairs ();
|
||||
|
||||
Reference in New Issue
Block a user