#
# Changelog:
+# 3.10:
+# * Fix exception in `/autosort helpers swap`.
# 3.9:
# * Remove `buffers.pl` from recommended settings.
# 3,8:
SCRIPT_NAME = 'autosort'
SCRIPT_AUTHOR = 'Maarten de Vries <maarten@de-vri.es>'
-SCRIPT_VERSION = '3.9'
+SCRIPT_VERSION = '3.10'
SCRIPT_LICENSE = 'GPL3'
SCRIPT_DESC = 'Flexible automatic (or manual) buffer sorting based on eval expressions.'
except KeyError as e:
raise HumanReadableError('No such helper: {0}'.format(e.args[0]))
- config.helpers.swap(index_a, index_b)
config.save_helpers()
command_helper_list(buffer, command, '')
return weechat.WEECHAT_RC_OK
def add_completions(completion, words):
for word in words:
- weechat.hook_completion_list_add(completion, word, 0, weechat.WEECHAT_LIST_POS_END)
+ weechat.completion_list_add(completion, word, 0, weechat.WEECHAT_LIST_POS_END)
def autosort_complete_rules(words, completion):
if len(words) == 0:
{*white}# Recommended settings
For the best visual effect, consider setting the following options:
- {*white}/set {cyan}irc.look.server_buffer{reset} {brown}independent{reset}
+{*white}/set {cyan}irc.look.server_buffer{reset} {brown}independent{reset}
This setting allows server buffers to be sorted independently, which is
needed to create a hierarchical tree view of the server and channel buffers.
If you are using the {*default}buflist{reset} plugin you can (ab)use Unicode to draw a tree
structure with the following setting (modify to suit your need):
- {*white}/set {cyan}buflist.format.indent {brown}"${{color:237}}${{if:${{buffer.next_buffer.local_variables.type}}=~^(channel|private)$?├─:└─}}"{reset}
+{*white}/set {cyan}buflist.format.indent {brown}"${{color:237}}${{if:${{buffer.next_buffer.local_variables.type}}=~^(channel|private)$?├─:└─}}"{reset}
'''
command_completion = '%(plugin_autosort) %(plugin_autosort) %(plugin_autosort) %(plugin_autosort) %(plugin_autosort)'
#
#
# History:
+# 2023-10-30: Sébastien Helleu <flashcode@flashtux.org>
+# version 32: revert to info "nick_color" with WeeChat >= 4.1.1
+# 2023-10-16: Sébastien Helleu <flashcode@flashtux.org>
+# version 31: use info "irc_nick_color" on IRC buffers with WeeChat >= 4.1.0
# 2022-11-07: mva
# version 30: add ":" and "," to VALID_NICK regexp,
# to don't reset colorization in input_line
SCRIPT_NAME = "colorize_nicks"
SCRIPT_AUTHOR = "xt <xt@bash.no>"
-SCRIPT_VERSION = "30"
+SCRIPT_VERSION = "32"
SCRIPT_LICENSE = "GPL"
SCRIPT_DESC = "Use the weechat nick colors in the chat area"
global colorize_config_file
return weechat.config_read(colorize_config_file)
-def colorize_nick_color(nick, my_nick):
+def colorize_nick_color(buffer, nick, my_nick):
''' Retrieve nick color from weechat. '''
if nick == my_nick:
return w.color(w.config_string(w.config_get('weechat.color.chat_nick_self')))
else:
+ version = int(w.info_get('version_number', '') or 0)
+ if w.buffer_get_string(buffer, 'plugin') == 'irc' and version == 0x4010000:
+ server = w.buffer_get_string(buffer, 'localvar_server')
+ return w.info_get('irc_nick_color', '%s,%s' % (server, nick))
return w.info_get('nick_color', nick)
def colorize_cb(data, modifier, modifier_data, line):
continue
nick = w.infolist_string(nicklist, 'name')
- nick_color = colorize_nick_color(nick, my_nick)
+ nick_color = colorize_nick_color(buffer_ptr, nick, my_nick)
colored_nicks[buffer_ptr][nick] = nick_color
colored_nicks[pointer] = {}
my_nick = w.buffer_get_string(pointer, 'localvar_nick')
- nick_color = colorize_nick_color(nick, my_nick)
+ nick_color = colorize_nick_color(pointer, nick, my_nick)
colored_nicks[pointer][nick] = nick_color
#
# History:
#
+# 2024-05-30, Sébastien Helleu <flashcode@flashtux.org>:
+# version 3.0.1: refresh buffer input at the end of search
+# 2024-05-30, Sébastien Helleu <flashcode@flashtux.org>:
+# version 3.0: refresh immediately buffer input when /go command is executed
+# (needed for WeeChat >= 4.3.0)
# 2023-06-21, Sébastien Helleu <flashcode@flashtux.org>:
# version 2.9: add option "min_chars"
# 2023-01-08, Sébastien Helleu <flashcode@flashtux.org>:
SCRIPT_NAME = 'go'
SCRIPT_AUTHOR = 'Sébastien Helleu <flashcode@flashtux.org>'
-SCRIPT_VERSION = '2.9'
+SCRIPT_VERSION = '3.0.1'
SCRIPT_LICENSE = 'GPL3'
SCRIPT_DESC = 'Quick jump to buffers'
go_unhook_one('modifier')
for hook in HOOK_COMMAND_RUN:
go_unhook_one(hook)
+ weechat.bar_item_update('input_text')
def go_hook_all():
if 'modifier' not in hooks:
hooks['modifier'] = weechat.hook_modifier(
'input_text_display_with_cursor', 'go_input_modifier', '')
+ weechat.bar_item_update('input_text')
def go_start(buf):
-Subproject commit 869c81eb79345f1da7b9ae91ad9fc8dc009603d1
+Subproject commit f4fcf380e7baff9b84d32ac5c55fd8effd393119