mirror of
https://github.com/weechat/weechat.git
synced 2026-07-04 08:43:13 +02:00
core: add bare display mode (for easy text selection and click on URLs)
New key: alt+"!", to swith to bare display (same key to come back to standard display). New options: - weechat.look.bare_display_exit_on_input (default: on): by default any changes in input will return to standard display - weechat.look.bare_display_time_format (default: "%H:%M"): the format of time used in bare display.
This commit is contained in:
+15
-1
@@ -1365,6 +1365,9 @@ COMMAND_CALLBACK(cursor)
|
||||
(void) buffer;
|
||||
(void) argv_eol;
|
||||
|
||||
if (gui_window_bare_display)
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
gui_cursor_mode_toggle ();
|
||||
@@ -6364,6 +6367,13 @@ COMMAND_CALLBACK(window)
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* bare display */
|
||||
if (string_strcasecmp (argv[1], "bare") == 0)
|
||||
{
|
||||
gui_window_bare_display_toggle ((argc > 2) ? argv[2] : NULL);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* jump to window by buffer number */
|
||||
if (string_strncasecmp (argv[1], "b", 1) == 0)
|
||||
{
|
||||
@@ -7426,7 +7436,8 @@ command_init ()
|
||||
"scroll_beyond_end|scroll_previous_highlight|scroll_next_highlight|"
|
||||
"scroll_unread [-window <number>]"
|
||||
" || swap [-window <number>] [up|down|left|right]"
|
||||
" || zoom[-window <number>]"),
|
||||
" || zoom[-window <number>]"
|
||||
" || bare [<delay>]"),
|
||||
N_(" list: list opened windows (without argument, this list is "
|
||||
"displayed)\n"
|
||||
" -1: jump to previous window\n"
|
||||
@@ -7463,6 +7474,8 @@ command_init ()
|
||||
" swap: swap buffers of two windows (with optional direction "
|
||||
"for target window)\n"
|
||||
" zoom: zoom on window\n"
|
||||
" bare: toggle bare display (with optional delay in "
|
||||
"milliseconds for automatic return to standard display mode)\n"
|
||||
"\n"
|
||||
"For splith and splitv, pct is a percentage which represents size of "
|
||||
"new window, computed with current window as size reference. For "
|
||||
@@ -7506,6 +7519,7 @@ command_init ()
|
||||
" || swap up|down|left|right|-window %(windows_numbers)"
|
||||
" || zoom -window %(windows_numbers)"
|
||||
" || merge all|-window %(windows_numbers)"
|
||||
" || bare"
|
||||
" || %(windows_numbers)",
|
||||
&command_window, NULL);
|
||||
}
|
||||
|
||||
@@ -155,6 +155,8 @@ struct t_config_option *config_look_prefix_buffer_align_more;
|
||||
struct t_config_option *config_look_prefix_buffer_align_more_after;
|
||||
struct t_config_option *config_look_prefix_same_nick;
|
||||
struct t_config_option *config_look_prefix_suffix;
|
||||
struct t_config_option *config_look_bare_display_exit_on_input;
|
||||
struct t_config_option *config_look_bare_display_time_format;
|
||||
struct t_config_option *config_look_read_marker;
|
||||
struct t_config_option *config_look_read_marker_always_show;
|
||||
struct t_config_option *config_look_read_marker_string;
|
||||
@@ -2594,6 +2596,17 @@ config_weechat_init_options ()
|
||||
"prefix_suffix", "string",
|
||||
N_("string displayed after prefix"),
|
||||
NULL, 0, 0, "|", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
|
||||
config_look_bare_display_exit_on_input = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"bare_display_exit_on_input", "boolean",
|
||||
N_("exit the bare display mode on any changes in input"),
|
||||
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_bare_display_time_format = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"bare_display_time_format", "string",
|
||||
N_("time format in bare display mode (see man strftime for date/time "
|
||||
"specifiers)"),
|
||||
NULL, 0, 0, "%H:%M", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL);
|
||||
config_look_read_marker = config_file_new_option (
|
||||
weechat_config_file, ptr_section,
|
||||
"read_marker", "integer",
|
||||
|
||||
@@ -187,6 +187,8 @@ extern struct t_config_option *config_look_prefix_buffer_align_more;
|
||||
extern struct t_config_option *config_look_prefix_buffer_align_more_after;
|
||||
extern struct t_config_option *config_look_prefix_same_nick;
|
||||
extern struct t_config_option *config_look_prefix_suffix;
|
||||
extern struct t_config_option *config_look_bare_display_exit_on_input;
|
||||
extern struct t_config_option *config_look_bare_display_time_format;
|
||||
extern struct t_config_option *config_look_read_marker;
|
||||
extern struct t_config_option *config_look_read_marker_always_show;
|
||||
extern struct t_config_option *config_look_read_marker_string;
|
||||
|
||||
Reference in New Issue
Block a user