# HG changeset patch # User Steve Losh # Date 1528647328 25200 # Node ID 9247b5bc73bb5de17c69a80b9a67a86ebd9e4714 # Parent a51c3522460419876adfdd6c69f88eb6c5988bfe linux diff -r a51c35224604 -r 9247b5bc73bb weechat/plugins.conf --- a/weechat/plugins.conf Sun Jun 10 09:15:18 2018 -0700 +++ b/weechat/plugins.conf Sun Jun 10 09:15:28 2018 -0700 @@ -70,6 +70,30 @@ python.notification_center.show_message_text = "on" python.notification_center.show_private_message = "on" python.notification_center.sound = "off" +python.slack.background_load_all_history = "false" +python.slack.channel_name_typing_indicator = "false" +python.slack.colorize_private_chats = "false" +python.slack.debug_level = "3" +python.slack.debug_mode = "false" +python.slack.distracting_channels = "" +python.slack.group_name_prefix = "&" +python.slack.map_underline_to = "_" +python.slack.migrated = "true" +python.slack.never_away = "true" +python.slack.record_events = "false" +python.slack.render_bold_as = "bold" +python.slack.render_italic_as = "italic" +python.slack.send_typing_notice = "false" +python.slack.server_aliases = "" +python.slack.short_buffer_names = "false" +python.slack.show_reaction_nicks = "false" +python.slack.slack_api_token = "${sec.data.slack_token}" +python.slack.slack_timeout = "20000" +python.slack.switch_buffer_on_join = "true" +python.slack.thread_suffix_color = "lightcyan" +python.slack.unfurl_auto_link_display = "both" +python.slack.unfurl_ignore_alt_text = "false" +python.slack.unhide_buffers_with_activity = "false" ruby.check_license = "on" tcl.check_license = "on" @@ -87,3 +111,26 @@ perl.colorize_lines.nicks = "comma separated list with nicknames. Only messages from nicks in this list will be colorized. (e.g.: freenode.nils_2,freenode.flashcode,freenode.weebot). You can also give a filename with nicks. The filename has to start with "/" (e.g.: /buddylist.txt). The format has to be: one nick each line with ." perl.colorize_lines.own_lines = "colors own written messages (default: off)" perl.colorize_lines.shuffle = "toggle shuffle color mode for chats area (default: off)" +python.slack.background_load_all_history = "Load history for each channel in the background as soon as it opens, rather than waiting for the user to look at it." +python.slack.channel_name_typing_indicator = "Change the prefix of a channel from # to > when someone is typing in it. Note that this will (temporarily) affect the sort order if you sort buffers by name rather than by number." +python.slack.colorize_private_chats = "Whether to use nick-colors in DM windows." +python.slack.debug_level = "Show only this level of debug info (or higher) when debug_mode is on. Lower levels -> more messages." +python.slack.debug_mode = "Open a dedicated buffer for debug messages and start logging to it. How verbose the logging is depends on log_level." +python.slack.distracting_channels = "List of channels to hide." +python.slack.group_name_prefix = "The prefix of buffer names for groups (private channels)." +python.slack.map_underline_to = "When sending underlined text to slack, use this formatting character for it. The default ("_") sends it as italics. Use "*" to send bold instead." +python.slack.never_away = "Poke Slack every five minutes so that it never marks you "away"." +python.slack.record_events = "Log all traffic from Slack to disk as JSON." +python.slack.render_bold_as = "When receiving bold text from Slack, render it as this in weechat." +python.slack.render_italic_as = "When receiving bold text from Slack, render it as this in weechat. If your terminal lacks italic support, consider using "underline" instead." +python.slack.send_typing_notice = "Alert Slack users when you are typing a message in the input bar (Requires reload)" +python.slack.server_aliases = "A comma separated list of `subdomain:alias` pairs. The alias will be used instead of the actual name of the slack (in buffer names, logging, etc). E.g `work:no_fun_allowed` would make your work slack show up as `no_fun_allowed` rather than `work.slack.com`." +python.slack.short_buffer_names = "Use `foo.#channel` rather than `foo.slack.com.#channel` as the internal name for Slack buffers. Overrides server_aliases." +python.slack.show_reaction_nicks = "Display the name of the reacting user(s) alongside each reactji." +python.slack.slack_api_token = "List of Slack API tokens, one per Slack instance you want to connect to. See the README for details on how to get these." +python.slack.slack_timeout = "How long (ms) to wait when communicating with Slack." +python.slack.switch_buffer_on_join = "When /joining a channel, automatically switch to it as well." +python.slack.thread_suffix_color = "Color to use for the [thread: XXX] suffix on messages that have threads attached to them." +python.slack.unfurl_auto_link_display = "When displaying ("unfurling") links to channels/users/etc, determine what is displayed when the text matches the url without the protocol. This happens when Slack automatically creates links, e.g. from words separated by dots or email addresses. Set it to "text" to only display the text written by the user, "url" to only display the url or "both" (the default) to display both." +python.slack.unfurl_ignore_alt_text = "When displaying ("unfurling") links to channels/users/etc, ignore the "alt text" present in the message and instead use the canonical name of the thing being linked to." +python.slack.unhide_buffers_with_activity = "When activity occurs on a buffer, unhide it even if it was previously hidden (whether by the user or by the distracting_channels setting)." diff -r a51c35224604 -r 9247b5bc73bb weechat/python/autoload/quotes.py --- a/weechat/python/autoload/quotes.py Sun Jun 10 09:15:18 2018 -0700 +++ b/weechat/python/autoload/quotes.py Sun Jun 10 09:15:28 2018 -0700 @@ -1,4 +1,4 @@ -import subprocess +import subprocess, os SCRIPT_NAME = 'quotes' SCRIPT_AUTHOR = 'Steve Losh ' @@ -9,8 +9,9 @@ SCRIPT_COMMAND_LONG = 'quoo' SCRIPT_COMMAND_COPY = 'cop' -QUOTE_FILE = '/Users/sjl/Dropbox/quotes.txt' -COPY_FILE = '/Users/sjl/.ircopy.irc' +HOME = os.getenv("HOME") +QUOTE_FILE = '%s/Dropbox/quotes.txt' % HOME +COPY_FILE = '%s/.ircopy.irc' % HOME import_ok = True diff -r a51c35224604 -r 9247b5bc73bb weechat/python/autoload/urlgrab.py --- a/weechat/python/autoload/urlgrab.py Sun Jun 10 09:15:18 2018 -0700 +++ b/weechat/python/autoload/urlgrab.py Sun Jun 10 09:15:28 2018 -0700 @@ -1,5 +1,6 @@ +# -*- coding: utf-8 -*- # -# UrlGrab, version 2.0 for weechat version 0.3 +# UrlGrab, for weechat version >= 0.3.0 # # Listens to all channels for URLs, collects them in a list, and launches # them in your favourite web server on the local host or a remote server. @@ -18,7 +19,7 @@ # # From the server window, you must specify a specific channel for the # list and launch commands, for example: -# /url list weechat +# /url list weechat # /url 3 weechat # # Configuration: @@ -52,7 +53,7 @@ # # remotecmd # The command to execute on the remote host for 'remote' mode. The -# default is 'bash -c "DISPLAY=:0.0 firefox %s"' Which runs bash, sets +# default is 'bash -c "DISPLAY=:0.0 firefox '%s'"' Which runs bash, sets # up the environment to display on the remote host's main X display, # and runs firefox. As with 'localcmd', the string '%s' will be # replaced with the URL. @@ -98,14 +99,32 @@ # - V1.6 FlashCode : Increase timeout for hook_process # (from 1 second to 1 minute) # - V1.7 FlashCode : Update WeeChat site -# - V1.8 drubin : +# - V1.8 drubin : # - Changed remote cmd to be single option # - Added scrolling on up and down arrow keys for /url show # - Changed remotecmd to include options with public/private keys password auth doesn't work -# - V1.9 Specimen : +# - V1.9 Specimen : # - Changed the default command when /url is run with no arguments to 'show' # - Removed '/url help' command, because /help is the standard way # - V2.0 Xilov: replace "/url help" by "/help url" +# - V2.1 nand: Changed default: firefox %s to firefox '%s' (localcmd) +# - V2.2 Sébastien Helleu : fix reload of config file +# - V2.3 nand: Allowed trailing )s for unmatched (s in URLs +# - V2.4 nand: Escaped URLs via URL-encoding instead of shell escaping, fixes ' +# - V2.5 nand: Fixed some URLs that got incorrectly mangled by escaping +# - V2.6 nesthib: Fixed escaping of "=" +# Added missing quotes in default parameter (firefox '%s') +# Removed the mix of tabs and spaces in the file indentation +# - V2.7 dobbymoodge +# ( https://github.com/dobbymoodge/ ): +# - Added 'copycmd' setting, users can set command to pipe into +# for '/url copy' +# - V2.8 Simmo Saan : +# - Changed print hook to ignore filtered lines +# - V2.9 Dominik Heidler : +# - Updated script for python3 support (now python2 and 3 are both supported) +# - V3.0 Sébastien Helleu : +# - Fix python 3 compatibility (replace "has_key" by "in") # # Copyright (C) 2005 David Rubin # @@ -125,19 +144,27 @@ # USA. # +from __future__ import print_function import sys import os try: import weechat import_ok = True except: - print "This script must be run under WeeChat." - print "Get WeeChat now at: http://www.weechat.org/" + print("This script must be run under WeeChat.") + print("Get WeeChat now at: http://www.weechat.org/") import_ok = False import subprocess import time +try: + from urllib import quote +except ImportError: + from urllib.parse import quote import re -from UserDict import UserDict +try: + from UserDict import UserDict +except ImportError: + from collections import UserDict octet = r'(?:2(?:[0-4]\d|5[0-5])|1\d\d|\d{1,2})' @@ -145,35 +172,46 @@ # Base domain regex off RFC 1034 and 1738 label = r'[0-9a-z][-0-9a-z]*[0-9a-z]?' domain = r'%s(?:\.%s)*\.[a-z][-0-9a-z]*[a-z]?' % (label, label) -urlRe = re.compile(r'(\w+://(?:%s|%s)(?::\d+)?(?:/[^\])>\s]*)?)' % (domain, ipAddr), re.I) +urlRe = re.compile(r'(\w+://(?:%s|%s)(?::\d+)?(?:/[^\]>\s]*)?)' % (domain, ipAddr), re.I) SCRIPT_NAME = "urlgrab" SCRIPT_AUTHOR = "David Rubin " -SCRIPT_VERSION = "2.0" +SCRIPT_VERSION = "3.0" SCRIPT_LICENSE = "GPL" SCRIPT_DESC = "Url functionality Loggin, opening of browser, selectable links" -CONFIG_FILE_NAME= "urlgrab" +CONFIG_FILE_NAME= "urlgrab" SCRIPT_COMMAND = "url" +def stripParens(url): + return dropChar(')', url.count(')') - url.count('('), url[::-1])[::-1] + +def dropChar(c, n, xs): + if n == 0 or xs == []: + return xs + elif xs[0] == c: + return dropChar(c, n-1, xs[1:]) + else: + return xs + def urlGrabPrint(message): bufferd=weechat.current_buffer() if urlGrabSettings['output_main_buffer'] == 1 : weechat.prnt("","[%s] %s" % ( SCRIPT_NAME, message ) ) else : weechat.prnt(bufferd,"[%s] %s" % ( SCRIPT_NAME, message ) ) - + def hashBufferName(bufferp): if not weechat.buffer_get_string(bufferp, "short_name"): bufferd = weechat.buffer_get_string(bufferp, "name") else: bufferd = weechat.buffer_get_string(bufferp, "short_name") return bufferd - + def ug_config_reload_cb(data, config_file): """ Reload configuration file. """ - return weechat.config_read(config_file) + return weechat.config_reload(config_file) class UrlGrabSettings(UserDict): def __init__(self): @@ -183,88 +221,96 @@ "ug_config_reload_cb", "") if not self.config_file: return - + section_color = weechat.config_new_section( self.config_file, "color", 0, 0, "", "", "", "", "", "", "", "", "", "") section_default = weechat.config_new_section( self.config_file, "default", 0, 0, "", "", "", "", "", "", "", "", "", "") - + self.data['color_buffer']=weechat.config_new_option( self.config_file, section_color, "color_buffer", "color", "Color to display buffer name", "", 0, 0, "red", "red", 0, "", "", "", "", "", "") - + self.data['color_url']=weechat.config_new_option( self.config_file, section_color, "color_url", "color", "Color to display urls", "", 0, 0, "blue", "blue", 0, "", "", "", "", "", "") - + self.data['color_time']=weechat.config_new_option( self.config_file, section_color, "color_time", "color", "Color to display time", "", 0, 0, "cyan", "cyan", 0, "", "", "", "", "", "") - + self.data['color_buffer_selected']=weechat.config_new_option( self.config_file, section_color, - "color_buffer_selected", "color", - "Color to display buffer selected name", "", 0, 0, "red", "red", + "color_buffer_selected", "color", + "Color to display buffer selected name", "", 0, 0, "red", "red", 0, "", "", "", "", "", "") - + self.data['color_url_selected']=weechat.config_new_option( self.config_file, section_color, "color_url_selected", "color", "Color to display url selected", "", 0, 0, "blue", "blue", 0, "", "", "", "", "", "") - + self.data['color_time_selected']=weechat.config_new_option( self.config_file, section_color, - "color_time_selected", "color", "Color to display tim selected", - "", 0, 0, "cyan", "cyan", 0, "", "", "", "", "", "") - + "color_time_selected", "color", "Color to display tim selected", + "", 0, 0, "cyan", "cyan", 0, "", "", "", "", "", "") + self.data['color_bg_selected']=weechat.config_new_option( self.config_file, section_color, "color_bg_selected", "color", "Background for selected row", "", 0, 0, - "green", "green", 0, "", "", "", "", "", "") - + "green", "green", 0, "", "", "", "", "", "") + self.data['historysize']=weechat.config_new_option( self.config_file, section_default, - "historysize", "integer", "Max number of urls to store per buffer", - "", 0, 999, "10", "10", 0, "", "", "", "", "", "") - + "historysize", "integer", "Max number of urls to store per buffer", + "", 0, 999, "10", "10", 0, "", "", "", "", "", "") + self.data['method']=weechat.config_new_option( self.config_file, section_default, "method", "string", """Where to launch URLs If 'local', runs %localcmd%. If 'remote' runs the following command: '%remodecmd%'""", "", 0, 0, - "local", "local", 0, "", "", "", "", "", "") - - + "local", "local", 0, "", "", "", "", "", "") + + self.data['copycmd']=weechat.config_new_option( + self.config_file, section_default, + "copycmd", "string", + "Command to pipe into for 'url copy'. " + "E.g. to copy into the CLIPBOARD buffer " + "instead of PRIMARY, you can use 'xsel -b " + "-i' here.", "", 0, 0, + "xsel -i", "xsel -i", 0, "", "", "", "", "", "") + self.data['localcmd']=weechat.config_new_option( self.config_file, section_default, "localcmd", "string", """Local command to execute""", "", 0, 0, - "firefox %s", "firefox %s", 0, "", "", "", "", "", "") - - remotecmd="ssh -x localhost -i ~/.ssh/id_rsa -C \"export DISPLAY=\":0.0\" && firefox %s\"" + "firefox '%s'", "firefox '%s'", 0, "", "", "", "", "", "") + + remotecmd="ssh -x localhost -i ~/.ssh/id_rsa -C \"export DISPLAY=\":0.0\" && firefox '%s'\"" self.data['remotecmd']=weechat.config_new_option( self.config_file, section_default, "remotecmd", "string", remotecmd, "", 0, 0, remotecmd, remotecmd, 0, "", "", "", "", "", "") - + self.data['url_log']=weechat.config_new_option( self.config_file, section_default, "url_log", "string", """log location""", "", 0, 0, "~/.weechat/urls.log", "~/.weechat/urls.log", 0, "", "", "", "", "", "") - + self.data['time_format']=weechat.config_new_option( self.config_file, section_default, "time_format", "string", """TIme format""", "", 0, 0, "%H:%M:%S", "%H:%M:%S", 0, "", "", "", "", "", "") - + self.data['output_main_buffer']=weechat.config_new_option( self.config_file, section_default, - "output_main_buffer", "boolean", + "output_main_buffer", "boolean", """Print text to main buffer or current one""", "", 0, 0, "1", "1", 0, "", "", "", "", "", "") weechat.config_read(self.config_file) @@ -312,21 +358,21 @@ def addUrl(self, bufferp,url ): global urlGrabSettings - self.globalUrls.insert(0,{"buffer":bufferp, + self.globalUrls.insert(0,{"buffer":bufferp, "url":url, "time":time.strftime(urlGrabSettings["time_format"])}) #Log urls only if we have set a log path. if urlGrabSettings['url_log']: try : - index = self.globalUrls[0] + index = self.globalUrls[0] logfile = os.path.expanduser(urlGrabSettings['url_log']) dout = open(logfile, "a") - dout.write("%s %s %s\n" % (index['time'], + dout.write("%s %s %s\n" % (index['time'], index['buffer'], index['url'])) dout.close() except : - print "failed to log url check that %s is valid path" % urlGrabSettings['url_log'] + print("failed to log url check that %s is valid path" % urlGrabSettings['url_log']) pass - + # check for buffer if not bufferp in self.urls: self.urls[bufferp] = [] @@ -344,7 +390,7 @@ def hasBuffer( self, bufferp ): return bufferp in self.urls - + def getUrl(self, bufferp, index): url = "" @@ -352,11 +398,11 @@ if len(self.urls[bufferp]) >= index: url = self.urls[bufferp][index-1] return url - + def prnt(self, buff): found = True - if self.urls.has_key(buff): + if buff in self.urls: if len(self.urls[buff]) > 0: i = 1 for url in self.urls[buff]: @@ -373,26 +419,26 @@ if not found: urlGrabPrint(buff + ": no entries") -def urlGrabCheckMsgline(bufferp, message): - global urlGrab, max_buffer_length - if not message: - return - # Ignore output from 'tinyurl.py' and our selfs - if ( message.startswith( "[AKA] http://tinyurl.com" ) or +def urlGrabCheckMsgline(bufferp, message, isdisplayed): + global urlGrab, max_buffer_length + if not message or isdisplayed == 0: + return + # Ignore output from 'tinyurl.py' and our selfs + if ( message.startswith( "[AKA] http://tinyurl.com" ) or message.startswith("[urlgrab]") ): - return - # Check for URLs - for url in urlRe.findall(message): - urlGrab.addUrl(bufferp,url) + return + # Check for URLs + for url in urlRe.findall(message): + urlGrab.addUrl(bufferp,stripParens(url)) if max_buffer_length < len(bufferp): max_buffer_length = len(bufferp) if urlgrab_buffer: refresh() - + def urlGrabCheck(data, bufferp, uber_empty, tagsn, isdisplayed, ishilight, prefix, message): - urlGrabCheckMsgline(hashBufferName(bufferp), message) - return weechat.WEECHAT_RC_OK + urlGrabCheckMsgline(hashBufferName(bufferp), message, isdisplayed) + return weechat.WEECHAT_RC_OK def urlGrabCopy(bufferd, index): global urlGrab @@ -409,26 +455,26 @@ urlGrabPrint("No URL found - Invalid index") else: try: - pipe = os.popen("xsel -i","w") + pipe = os.popen(urlGrabSettings['copycmd'],"w") pipe.write(url) pipe.close() urlGrabPrint("Url: %s gone to clipboard." % url) except: - urlGrabPrint("Url: %s faile to copy to clipboard." % url) + urlGrabPrint("Url: %s failed to copy to clipboard." % url) def urlGrabOpenUrl(url): global urlGrab, urlGrabSettings - argl = urlGrabSettings.createCmd( url ) + argl = urlGrabSettings.createCmd( quote(url, '/:#%?&+=') ) weechat.hook_process(argl,60000, "ug_open_cb", "") def ug_open_cb(data, command, code, out, err): - #print out - #print err + # weechat.prnt("", out) + # weechat.prnt("", err) return weechat.WEECHAT_RC_OK - + def urlGrabOpen(bufferd, index): - global urlGrab, urlGrabSettings + global urlGrab, urlGrabSettings if bufferd == "": urlGrabPrint( "No current channel, you must specify one" ) elif not urlGrab.hasBuffer(bufferd) : @@ -480,8 +526,8 @@ if len(largs) > 1: no = int(largs[1]) urlGrabCopy(bufferd, no) - else: - urlGrabCopy(bufferd,1) + else: + urlGrabCopy(bufferd,1) else: try: no = int(largs[0]) @@ -490,9 +536,9 @@ else: urlGrabOpen(bufferd, no) except ValueError: - #not a valid number so try opening it as a url.. + #not a valid number so try opening it as a url.. for url in urlRe.findall(largs[0]): - urlGrabOpenUrl(url) + urlGrabOpenUrl(stripParens(url)) urlGrabPrint( "Unknown command '%s'. Try '/help url' for usage" % largs[0]) return weechat.WEECHAT_RC_OK @@ -526,7 +572,7 @@ refresh_line (temp_current) refresh_line (current_line) weechat.command(urlgrab_buffer, "/window scroll_top") - pass + pass elif args == "scroll_bottom": temp_current = current_line current_line = len(urlGrab.globalUrls) @@ -541,7 +587,7 @@ global urlGrab , urlGrabSettings, urlgrab_buffer, current_line, max_buffer_length #Print format Time(space)buffer(max4 spaces, but lined up)url format = "%%s%%s %%s%%-%ds%%s%%s" % (max_buffer_length+4) - + #non selected colors color_buffer = urlGrabSettings["color_buffer"] color_url = urlGrabSettings["color_url"] @@ -550,32 +596,32 @@ color_buffer_selected = urlGrabSettings["color_buffer_selected"] color_url_selected = urlGrabSettings["color_url_selected"] color_time_selected = urlGrabSettings["color_time_selected"] - + color_bg_selected = urlGrabSettings["color_bg_selected"] - + color1 = color_time color2 = color_buffer color3 = color_url - + #If this line is selected we change the colors. if y == current_line: color1 = "%s,%s" % (color_time_selected, color_bg_selected) color2 = "%s,%s" % (color_buffer_selected, color_bg_selected) color3 = "%s,%s" % (color_url_selected, color_bg_selected) - + color1 = weechat.color(color1) color2 = weechat.color(color2) color3 = weechat.color(color3) text = format % (color1, urlGrab.globalUrls[y]['time'], - color2, + color2, urlGrab.globalUrls[y]['buffer'], - color3, + color3, urlGrab.globalUrls[y]['url'] ) weechat.prnt_y(urlgrab_buffer,y,text) - + def ugCheckLineOutsideWindow(): - global urlGrab , urlGrabSettings, urlgrab_buffer, current_line, max_buffer_length + global urlGrab , urlGrabSettings, urlgrab_buffer, current_line, max_buffer_length if (urlgrab_buffer): infolist = weechat.infolist_get("window", "", "current") if (weechat.infolist_next(infolist)): @@ -586,7 +632,7 @@ elif(start_line_y <= current_line - chat_height): weechat.command(urlgrab_buffer, "/window scroll +%i"%(current_line - start_line_y - chat_height + 1)) weechat.infolist_free(infolist) - + def refresh(): global urlGrab @@ -594,8 +640,8 @@ for x in urlGrab.globalUrls: refresh_line (y) y += 1 - - + + def init(): global urlGrab , urlGrabSettings, urlgrab_buffer if not urlgrab_buffer: @@ -628,7 +674,7 @@ return weechat.WEECHAT_RC_OK #Main stuff -if ( import_ok and +if ( import_ok and weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE,SCRIPT_DESC, "ug_unload_script", "") ): urlgrab_buffer = None @@ -650,4 +696,4 @@ weechat.hook_completion("urlgrab_urls", "list of URLs", "completion_urls_cb", "") else: - print "failed to load weechat" + print("failed to load weechat") diff -r a51c35224604 -r 9247b5bc73bb weechat/sec.conf --- a/weechat/sec.conf Sun Jun 10 09:15:18 2018 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -# -# weechat -- sec.conf -# -# WARNING: It is NOT recommended to edit this file by hand, -# especially if WeeChat is running. -# -# Use /set or similar command to change settings in WeeChat. -# -# For more info, see: https://weechat.org/doc/quickstart -# - -[crypt] -cipher = aes256 -hash_algo = sha256 -passphrase_file = "" -salt = on - -[data] diff -r a51c35224604 -r 9247b5bc73bb weechat/urlgrab.conf --- a/weechat/urlgrab.conf Sun Jun 10 09:15:18 2018 -0700 +++ b/weechat/urlgrab.conf Sun Jun 10 09:15:28 2018 -0700 @@ -19,8 +19,9 @@ color_url_selected = blue [default] +copycmd = "xsel -i" historysize = 20 -localcmd = "open %s" +localcmd = "xdg-open %s" method = "local" output_main_buffer = off remotecmd = "ssh -x localhost -i ~/.ssh/id_rsa -C "export DISPLAY=":0.0" && firefox %s"" diff -r a51c35224604 -r 9247b5bc73bb weechat/weechat.conf --- a/weechat/weechat.conf Sun Jun 10 09:15:18 2018 -0700 +++ b/weechat/weechat.conf Sun Jun 10 09:15:28 2018 -0700 @@ -1,5 +1,12 @@ # -# weechat.conf -- weechat v0.4.2 +# weechat -- weechat.conf +# +# WARNING: It is NOT recommended to edit this file by hand, +# especially if WeeChat is running. +# +# Use /set or similar command to change settings in WeeChat. +# +# For more info, see: https://weechat.org/doc/quickstart # [debug] @@ -13,11 +20,20 @@ [look] align_end_of_lines = message +align_multiline_words = on bar_more_down = "++" bar_more_left = "<<" bar_more_right = ">>" bar_more_up = "--" +bare_display_exit_on_input = on +bare_display_time_format = "%H:%M" +buffer_auto_renumber = on buffer_notify_default = all +buffer_position = end +buffer_search_case_sensitive = off +buffer_search_force_default = off +buffer_search_regex = off +buffer_search_where = prefix_message buffer_time_format = "%H:%M" color_basic_force_bold = off color_inactive_buffer = off @@ -30,14 +46,18 @@ color_pairs_auto_reset = 5 color_real_white = off command_chars = "" +command_incomplete = off confirm_quit = off +confirm_upgrade = off day_change = on day_change_message_1date = "-- %a, %d %b %Y --" day_change_message_2dates = "-- %%a, %%d %%b %%Y (%a, %d %b %Y) --" eat_newline_glitch = off +emphasized_attributes = "" highlight = "sjl,slosh,slj,clojerks,horrifying,remotes" highlight_regex = "(red[- ]tape|steve ?losh|rob ford|(jesus )?fucking christ|bring me my [A-Za-z0-9_]+ (pant|breeche|kilt|skirt|short|jort|plort)s?|(horse|mouse|clown)fuckers?|([[:<:]]((mother)?fuck([ie]ng?|er)?|(god?)?damn(ed)?|dammit|(bull|horse)?shite?)[[:>:]].*){3,}|actual footage|pork ?belly)" highlight_tags = "" +hotlist_add_conditions = "${away} || ${buffer.num_displayed} == 0" hotlist_buffer_separator = ", " hotlist_count_max = 2 hotlist_count_min_msg = 2 @@ -46,6 +66,7 @@ hotlist_names_level = 12 hotlist_names_merged_buffers = off hotlist_prefix = "H: " +hotlist_remove = merged hotlist_short_names = on hotlist_sort = group_time_asc hotlist_suffix = "" @@ -54,16 +75,24 @@ input_share = none input_share_overwrite = off input_undo_max = 32 +item_away_message = on item_buffer_filter = "*" +item_buffer_zoom = "!" +item_mouse_status = "M" item_time_format = "%H:%M" jump_current_to_previous_buffer = on jump_previous_buffer_when_closing = on jump_smart_back_to_buffer = on key_bind_safe = on +key_grab_delay = 800 mouse = off mouse_timer_delay = 100 +nick_color_force = "" +nick_color_hash = djb2 +nick_color_stop_chars = "_|[" nick_prefix = "" nick_suffix = "" +paste_auto_add_newline = on paste_bracketed = off paste_bracketed_timer_delay = 10 paste_max_lines = 3 @@ -83,20 +112,29 @@ prefix_quit = "✘" prefix_same_nick = "" prefix_suffix = "|" +quote_nick_prefix = "<" +quote_nick_suffix = ">" +quote_time_format = "%H:%M:%S" read_marker = line read_marker_always_show = on read_marker_string = "◡◡◠" save_config_on_exit = off -save_layout_on_exit = "all" +save_config_with_fsync = off +save_layout_on_exit = all scroll_amount = 3 scroll_bottom_after_switch = off scroll_page_percent = 100 search_text_not_found_alert = on separator_horizontal = "-" separator_vertical = "" +tab_width = 1 time_format = "%a, %d %b %Y %T" +window_auto_zoom = off window_separator_horizontal = on window_separator_vertical = on +window_title = "" +word_chars_highlight = "!\u00A0,-,_,|,alnum" +word_chars_input = "!\u00A0,-,_,|,alnum" [palette] @@ -140,10 +178,12 @@ chat_time = 238 chat_time_delimiters = 236 chat_value = cyan +chat_value_null = blue emphasized = yellow emphasized_bg = magenta input_actions = lightgreen input_text_not_found = red +item_away = yellow nicklist_away = cyan nicklist_group = green separator = green @@ -157,15 +197,19 @@ status_data_private = lightgreen status_filter = green status_more = 16 +status_mouse = green status_name = *16 status_name_ssl = *16 +status_nicklist_count = default status_number = 16 status_time = *16 [completion] base_word_until_cursor = on +command_inline = on default_template = "%(nicks)|%(irc_channels)" nick_add_space = on +nick_case_sensitive = off nick_completer = ":" nick_first_only = off nick_ignore_chars = "[]`_-^" @@ -174,6 +218,7 @@ partial_completion_command_arg = off partial_completion_count = on partial_completion_other = off +partial_completion_templates = "config_options" [history] display_default = 5 @@ -186,11 +231,7 @@ [network] connection_timeout = 60 -# gnutls_ca_file = "%h/ssl/CAs.pem" -# gnutls_ca_file = "~/.weechat/certs/ca-bundle.crt" -# gnutls_ca_file = "/usr/local/etc/openssl/cert.pem" -# gnutls_ca_file = "/Users/sjl/src/sighborg/certs/ssl_ca_bundle.pem" -gnutls_ca_file = "~/certs.pem" +gnutls_ca_file = "/etc/ssl/certs/ca-certificates.crt" gnutls_handshake_timeout = 30 proxy_curl = "" @@ -216,6 +257,34 @@ buffers.size = 0 buffers.size_max = 0 buffers.type = root +buflist.color_bg = default +buflist.color_delim = default +buflist.color_fg = default +buflist.conditions = "" +buflist.filling_left_right = vertical +buflist.filling_top_bottom = columns_vertical +buflist.hidden = off +buflist.items = "buflist" +buflist.position = left +buflist.priority = 0 +buflist.separator = on +buflist.size = 0 +buflist.size_max = 0 +buflist.type = root +fset.color_bg = default +fset.color_delim = cyan +fset.color_fg = default +fset.conditions = "${buffer.full_name} == fset.fset" +fset.filling_left_right = vertical +fset.filling_top_bottom = horizontal +fset.hidden = off +fset.items = "fset" +fset.position = top +fset.priority = 0 +fset.separator = on +fset.size = 3 +fset.size_max = 3 +fset.type = window input.color_bg = default input.color_delim = green input.color_fg = default @@ -310,6 +379,8 @@ ctrl-W = "/input delete_previous_word" ctrl-X = "/input switch_active_buffer" ctrl-Y = "/input clipboard_paste" +meta-meta-OP = "/bar scroll buflist * b" +meta-meta-OQ = "/bar scroll buflist * e" meta-meta2-1~ = "/window scroll_top" meta-meta2-23~ = "/bar scroll nicklist * yb" meta-meta2-24~ = "/bar scroll nicklist * ye" @@ -341,6 +412,8 @@ meta-OD = "/input move_previous_word" meta-OF = "/input move_end_of_line" meta-OH = "/input move_beginning_of_line" +meta-OP = "/bar scroll buflist * -100%" +meta-OQ = "/bar scroll buflist * +100%" meta-Oa = "/input history_global_previous" meta-Ob = "/input history_global_next" meta-Oc = "/input move_next_word" @@ -351,12 +424,12 @@ meta2-19~ = "/window +1" meta2-1;3A = "/buffer -1" meta2-1;3B = "/buffer +1" -meta2-1;9A = "/buffer move -1" -meta2-1;9B = "/buffer move +1" meta2-1;3C = "/buffer +1" meta2-1;3D = "/buffer -1" meta2-1;5A = "/input history_global_previous" meta2-1;5B = "/input history_global_next" +meta2-1;9A = "/buffer move -1" +meta2-1;9B = "/buffer move +1" meta2-1~ = "/input move_beginning_of_line" meta2-20~ = "/bar scroll title * x-50%" meta2-21~ = "/bar scroll title * x+50%" @@ -538,11 +611,21 @@ @chat:q = "hsignal:chat_quote_prefix_message;/cursor stop" [key_mouse] +@bar(buflist):ctrl-wheeldown = "hsignal:buflist_mouse" +@bar(buflist):ctrl-wheelup = "hsignal:buflist_mouse" @bar(input):button2 = "/input grab_mouse_area" @bar(nicklist):button1-gesture-down = "/bar scroll nicklist ${_window_number} +100%" @bar(nicklist):button1-gesture-down-long = "/bar scroll nicklist ${_window_number} e" @bar(nicklist):button1-gesture-up = "/bar scroll nicklist ${_window_number} -100%" @bar(nicklist):button1-gesture-up-long = "/bar scroll nicklist ${_window_number} b" +@chat(fset.fset):button1 = "/window ${_window_number};/fset -go ${_chat_line_y}" +@chat(fset.fset):button2* = "hsignal:fset_mouse" +@chat(fset.fset):wheeldown = "/fset -down 5" +@chat(fset.fset):wheelup = "/fset -up 5" +@chat(script.scripts):button1 = "/window ${_window_number};/script go ${_chat_line_y}" +@chat(script.scripts):button2 = "/window ${_window_number};/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}" +@chat(script.scripts):wheeldown = "/script down 5" +@chat(script.scripts):wheelup = "/script up 5" @item(buffer_nicklist):button1 = "/window ${_window_number};/query ${nick}" @item(buffer_nicklist):button1-gesture-left = "/window ${_window_number};/kick ${nick}" @item(buffer_nicklist):button1-gesture-left-long = "/window ${_window_number};/kickban ${nick}" @@ -550,6 +633,12 @@ @item(buffer_nicklist):button2-gesture-left = "/window ${_window_number};/ban ${nick}" @item(buffers):button1* = "hsignal:buffers_mouse" @item(buffers):button2* = "hsignal:buffers_mouse" +@item(buflist):button1* = "hsignal:buflist_mouse" +@item(buflist):button2* = "hsignal:buflist_mouse" +@item(buflist2):button1* = "hsignal:buflist_mouse" +@item(buflist2):button2* = "hsignal:buflist_mouse" +@item(buflist3):button1* = "hsignal:buflist_mouse" +@item(buflist3):button2* = "hsignal:buflist_mouse" @bar:wheeldown = "/bar scroll ${_bar_name} ${_window_number} +20%" @bar:wheelup = "/bar scroll ${_bar_name} ${_window_number} -20%" @chat:button1 = "/window ${_window_number}" diff -r a51c35224604 -r 9247b5bc73bb weechat/xfer.conf --- a/weechat/xfer.conf Sun Jun 10 09:15:18 2018 -0700 +++ b/weechat/xfer.conf Sun Jun 10 09:15:28 2018 -0700 @@ -30,6 +30,7 @@ fast_send = on own_ip = "" port_range = "" +send_ack = on speed_limit = 0 timeout = 300