WIP chat system

This commit is contained in:
Daniel Flanagan 2019-12-16 17:21:44 -06:00
parent c40fe94b70
commit ea5debe38c
5 changed files with 148 additions and 11 deletions

View File

@ -133,3 +133,6 @@ alias mutt="neomutt"
# fsw aliases
alias fsw-mix-test="fsw \"mix test\" ./**/*.{ex,exs,erl,hrl,xrl,yrl}"
# weechat aliases
alias chat="WEECHAT_PASSPHRASE=\"\$(pass weechat-passphrase | head -n 1)\" weechat"

View File

@ -129,7 +129,7 @@ local_hostname = ""
msg_kick = ""
msg_part = "WeeChat ${info:version}"
msg_quit = "WeeChat ${info:version}"
nicks = "lytedev,lyte"
nicks = "daniel,daniel1,daniel2,daniel3,daniel4"
nicks_alternate = on
notify = ""
password = ""
@ -149,6 +149,6 @@ ssl_fingerprint = ""
ssl_priorities = "NORMAL:-VERS-SSL3.0"
ssl_verify = on
usermode = ""
username = "lytedev"
username = "daniel"
[server]

View File

@ -10,5 +10,129 @@
#
[var]
perl.highmon.alignment = "channel"
perl.highmon.away_only = "off"
perl.highmon.color_buf = "on"
perl.highmon.first_run = "true"
perl.highmon.hotlist_show = "off"
perl.highmon.logging = "off"
perl.highmon.merge_private = "off"
perl.highmon.nick_prefix = "<"
perl.highmon.nick_suffix = ">"
perl.highmon.output = "buffer"
perl.highmon.short_names = "off"
python.autobump.highprio_buffers = "irc.server.*,core.weechat"
python.autobump.lowprio_buffers = ""
python.autobump.tags = "notify_message,notify_private,self_msg"
python.buffer_open.layout_apply = "off"
python.buffer_open.max_closed = "10"
python.go.auto_jump = "off"
python.go.buffer_number = "on"
python.go.color_name = "black,cyan"
python.go.color_name_highlight = "red,cyan"
python.go.color_name_highlight_selected = "red,brown"
python.go.color_name_selected = "black,brown"
python.go.color_number = "yellow,magenta"
python.go.color_number_selected = "yellow,red"
python.go.fuzzy_search = "off"
python.go.message = "Go to: "
python.go.short_name = "off"
python.go.sort = "number,beginning"
python.go.use_core_instead_weechat = "off"
python.grep.clear_buffer = "off"
python.grep.default_tail_head = "10"
python.grep.go_to_buffer = "on"
python.grep.log_filter = ""
python.grep.max_lines = "4000"
python.grep.show_summary = "on"
python.grep.size_limit = "2048"
python.grep.timeout_secs = "300"
python.slack.auto_open_threads = "false"
python.slack.background_load_all_history = "false"
python.slack.channel_name_typing_indicator = "true"
python.slack.color_buflist_muted_channels = "darkgray"
python.slack.color_edited_suffix = "095"
python.slack.color_reaction_suffix = "darkgray"
python.slack.color_thread_suffix = "lightcyan"
python.slack.colorize_private_chats = "false"
python.slack.debug_level = "3"
python.slack.debug_mode = "false"
python.slack.distracting_channels = ""
python.slack.external_user_suffix = "*"
python.slack.files_download_location = ""
python.slack.group_name_prefix = "&"
python.slack.map_underline_to = "_"
python.slack.migrated = "true"
python.slack.muted_channels_activity = "personal_highlights"
python.slack.never_away = "false"
python.slack.notify_usergroup_handle_updated = "false"
python.slack.record_events = "false"
python.slack.render_bold_as = "bold"
python.slack.render_italic_as = "italic"
python.slack.send_typing_notice = "true"
python.slack.server_aliases = ""
python.slack.shared_name_prefix = "%"
python.slack.short_buffer_names = "false"
python.slack.show_buflist_presence = "true"
python.slack.show_reaction_nicks = "false"
python.slack.slack_api_token = "INSERT VALID KEY HERE!"
python.slack.slack_timeout = "20000"
python.slack.switch_buffer_on_join = "true"
python.slack.thread_messages_in_channel = "false"
python.slack.unfurl_auto_link_display = "both"
python.slack.unfurl_ignore_alt_text = "false"
python.slack.unhide_buffers_with_activity = "false"
[desc]
python.autobump.highprio_buffers = "List of buffers to be sorted with high priority"
python.autobump.lowprio_buffers = "List of buffers to be sorted with low priority"
python.autobump.tags = "List of message tags that are considered activity"
python.buffer_open.layout_apply = "open closed layout buffers on /layout apply (default: "off")"
python.buffer_open.max_closed = "maximum number of closed buffers to remember (default: "10")"
python.go.auto_jump = "automatically jump to buffer when it is uniquely selected (default: "off")"
python.go.buffer_number = "display buffer number (default: "on")"
python.go.color_name = "color for buffer name (not selected) (default: "black,cyan")"
python.go.color_name_highlight = "color for highlight in buffer name (not selected) (default: "red,cyan")"
python.go.color_name_highlight_selected = "color for highlight in a selected buffer name (default: "red,brown")"
python.go.color_name_selected = "color for a selected buffer name (default: "black,brown")"
python.go.color_number = "color for buffer number (not selected) (default: "yellow,magenta")"
python.go.color_number_selected = "color for selected buffer number (default: "yellow,red")"
python.go.fuzzy_search = "search buffer matches using approximation (default: "off")"
python.go.message = "message to display before list of buffers (default: "Go to: ")"
python.go.short_name = "display and search in short names instead of buffer name (default: "off")"
python.go.sort = "comma-separated list of keys to sort buffers (the order is important, sorts are performed in the given order): name = sort by name (or short name), (default: "number,beginning")"
python.go.use_core_instead_weechat = "use name "core" instead of "weechat" for core buffer (default: "off")"
python.slack.auto_open_threads = "Automatically open threads when mentioned or inresponse to own messages."
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.color_buflist_muted_channels = "Color to use for muted channels in the buflist"
python.slack.color_edited_suffix = "Color to use for (edited) suffix on messages that have been edited."
python.slack.color_reaction_suffix = "Color to use for the [:wave:(@user)] suffix on messages that have reactions attached to them."
python.slack.color_thread_suffix = "Color to use for the [thread: XXX] suffix on messages that have threads attached to them."
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.external_user_suffix = "The suffix appended to nicks to indicate external users."
python.slack.files_download_location = "If set, file attachments will be automatically downloaded to this location."
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.muted_channels_activity = "Control which activity you see from muted channels, either none, personal_highlights, all_highlights or all. none: Don't show any activity. personal_highlights: Only show personal highlights, i.e. not @channel and @here. all_highlights: Show all highlights, but not other messages. all: Show all activity, like other channels."
python.slack.never_away = "Poke Slack every five minutes so that it never marks you "away"."
python.slack.notify_usergroup_handle_updated = "Control if you want to see notification when a usergroup's handle has changed, either true or false"
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.shared_name_prefix = "The prefix of buffer names for shared channels."
python.slack.short_buffer_names = "Use `foo.#channel` rather than `foo.slack.com.#channel` as the internal name for Slack buffers."
python.slack.show_buflist_presence = "Display a `+` character in the buffer list for present users."
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_messages_in_channel = "When enabled shows thread messages in the parent channel."
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)."

View File

@ -293,15 +293,15 @@ nicklist.color_fg = default
nicklist.conditions = "${nicklist}"
nicklist.filling_left_right = vertical
nicklist.filling_top_bottom = columns_vertical
nicklist.hidden = off
nicklist.hidden = on
nicklist.items = "buffer_nicklist"
nicklist.position = right
nicklist.priority = 200
nicklist.separator = on
nicklist.size = 0
nicklist.size_max = 0
nicklist.size_max = 10
nicklist.type = window
status.color_bg = blue
status.color_bg = 0
status.color_delim = cyan
status.color_fg = default
status.conditions = ""
@ -315,7 +315,7 @@ status.separator = off
status.size = 1
status.size_max = 0
status.type = window
title.color_bg = blue
title.color_bg = 0
title.color_delim = cyan
title.color_fg = default
title.conditions = ""
@ -333,6 +333,7 @@ title.type = window
[layout]
[notify]
perl.highmon = none
[filter]
@ -616,6 +617,11 @@ meta2-A = "/cursor move up"
meta2-B = "/cursor move down"
meta2-C = "/cursor move right"
meta2-D = "/cursor move left"
@chat(python.*):D = "hsignal:slack_cursor_delete"
@chat(python.*):L = "hsignal:slack_cursor_linkarchive"
@chat(python.*):M = "hsignal:slack_cursor_message"
@chat(python.*):R = "hsignal:slack_cursor_reply"
@chat(python.*):T = "hsignal:slack_cursor_thread"
@item(buffer_nicklist):K = "/window ${_window_number};/kickban ${nick}"
@item(buffer_nicklist):b = "/window ${_window_number};/ban ${nick}"
@item(buffer_nicklist):k = "/window ${_window_number};/kick ${nick}"
@ -637,6 +643,7 @@ meta2-D = "/cursor move left"
@chat(fset.fset):button2* = "hsignal:fset_mouse"
@chat(fset.fset):wheeldown = "/fset -down 5"
@chat(fset.fset):wheelup = "/fset -up 5"
@chat(python.*):button2 = "hsignal:slack_mouse"
@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"

View File

@ -1,11 +1,14 @@
#!/usr/bin/env bash
pacaur --needed -S --noconfirm --noedit \
weechat-poljar-matrix-git weechat-discord-git
weechat-poljar-matrix-git weechat-discord-git wee-slack
ln -s /usr/lib/weechat/python/matrix/ ~/.weechat/python/
ln -s /usr/lib/weechat/python/matrix.py ~/.weechat/python/
ln -s /usr/lib/weechat/python/matrix.py ~/.weechat/python/autoload/
wcpm="/usr/lib/weechat/python/matrix"
hwcp="${HOME}/.weechat/python"
ln -s "${wcpm}/" "${hwcp}/"
ln -s "${wcpm}.py" "${hwcp}/"
ln -s "${wcpm}.py" "${hwcp}/autoload/"
ln -s "/usr/lib/weechat/python/wee_slack.py" "${hwcp}/"
ln -s "/usr/lib/weechat/python/wee_slack.py" "${hwcp}/autoload/"
# Scripts are in /usr/lib/weechat/python/matrix/contrib/