clone url: git://git.m455.casa/m455.casa
html/archive/2021/weechat-tips.html
1 | <!DOCTYPE html> |
2 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
3 | <head> |
4 | <meta charset="utf-8" /> |
5 | <meta name="generator" content="pandoc" /> |
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> |
7 | <title>WeeChat tips</title> |
8 | <style> |
9 | code{white-space: pre-wrap;} |
10 | span.smallcaps{font-variant: small-caps;} |
11 | span.underline{text-decoration: underline;} |
12 | div.column{display: inline-block; vertical-align: top; width: 50%;} |
13 | div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} |
14 | ul.task-list{list-style: none;} |
15 | </style> |
16 | <style> |
17 | body { |
18 | line-height: 1.5; |
19 | font-family: sans-serif; |
20 | font-size: 18px; |
21 | margin: 20px auto; |
22 | max-width: 630px; |
23 | } |
24 |
|
25 | a { |
26 | color: blue; |
27 | } |
28 |
|
29 | code, pre { |
30 | background-color: #fddee3; |
31 | font-size: 14px; |
32 | } |
33 |
|
34 | pre { |
35 | padding: 25px 25px; |
36 | overflow: auto; |
37 | } |
38 |
|
39 | pre code { |
40 | white-space: pre; |
41 | } |
42 |
|
43 | img { |
44 | max-width: 100%; |
45 | } |
46 |
|
47 | table { |
48 | border-collapse: collapse; |
49 | } |
50 |
|
51 | table caption { |
52 | font-weight: bold; |
53 | margin: 10px 0px; |
54 | text-align: left; |
55 | } |
56 |
|
57 | th, td { |
58 | border: 1px solid #000; |
59 | padding: 4px; |
60 | } |
61 |
|
62 | blockquote { |
63 | border-left: 3px solid #000; |
64 | padding-left: 10px; |
65 | } |
66 |
|
67 | .border { |
68 | border: 1px solid #000; |
69 | margin: 25px 0px; |
70 | padding: 5px 25px; |
71 | } |
72 |
|
73 | @media only screen and (max-width: 700px) { |
74 | body { |
75 | margin: 10px; |
76 | } |
77 | } |
78 |
|
79 | @media (prefers-color-scheme: dark) { |
80 | body { |
81 | background-color: #111; |
82 | color: #eee; |
83 | } |
84 | a { |
85 | color: #009fff; |
86 | } |
87 | code, pre { |
88 | background-color: #111; |
89 | color: #fd6363; |
90 | } |
91 | pre { |
92 | padding: 15px 25px; |
93 | } |
94 | blockquote { |
95 | border-left: 3px solid #666; |
96 | } |
97 | .border, th, td { |
98 | border: 1px solid #666; |
99 | } |
100 | } |
101 | </style> |
102 | </head> |
103 | <body> |
104 | <main> |
105 | <h2 id="weechat-tips">WeeChat tips</h2> |
106 | <p>2021-01-19 00:00</p> |
107 | <p>Here are some handy things I learned from using WeeChat that might be valuable to some people.</p> |
108 | <h3 id="page-overview">Page overview</h3> |
109 | <!-- vim-markdown-toc GFM --> |
110 | <ul> |
111 | <li><a href="#adding-an-irc-network-securely">Adding an IRC network securely</a> |
112 | <ul> |
113 | <li><a href="#registering-your-nickname">Registering your nickname</a></li> |
114 | <li><a href="#adding-servers-and-credentials">Adding servers and credentials</a></li> |
115 | <li><a href="#changing-your-password">Changing your password</a></li> |
116 | </ul></li> |
117 | <li><a href="#adding-an-irc-network-insecurely">Adding an IRC network insecurely</a> |
118 | <ul> |
119 | <li><a href="#registering-your-nickname-1">Registering your nickname</a></li> |
120 | <li><a href="#adding-servers-and-credentials-1">Adding servers and credentials</a></li> |
121 | <li><a href="#changing-your-password-1">Changing your password</a></li> |
122 | </ul></li> |
123 | <li><a href="#tweaks-and-tricks">Tweaks and tricks</a></li> |
124 | </ul> |
125 | <!-- vim-markdown-toc --> |
126 | <h3 id="adding-an-irc-network-securely">Adding an IRC network securely</h3> |
127 | <p>The tips in this section won’t leave plaintext passwords in <code>~/.weechat/irc.conf</code>.</p> |
128 | <h4 id="registering-your-nickname">Registering your nickname</h4> |
129 | <pre><code>/msg nickserv register <your-password> <your-email@example.com></code></pre> |
130 | <h4 id="adding-servers-and-credentials">Adding servers and credentials</h4> |
131 | <pre><code>/secure passphrase <your-password-to-unlock-all-passwords> |
132 | /secure set libera.chat_password <your-password> |
133 | /server add libera.chat libera.chat/6697 -ssl |
134 | /set irc.server.libera.chat.sasl_username "<username>" |
135 | /set irc.server.libera.chat.sasl_password "${sec.data.libera.chat_password}" |
136 | /set irc.server.libera.chat.autoconnect on |
137 | /set irc.server.libera.chat.autojoin "#coolchannel,#anothercoolchannel"</code></pre> |
138 | <h4 id="changing-your-password">Changing your password</h4> |
139 | <pre><code>/secure set libera.chat_password <new-password> |
140 | /save</code></pre> |
141 | <h3 id="adding-an-irc-network-insecurely">Adding an IRC network insecurely</h3> |
142 | <p>The tips in this section will leave plaintext passwords in <code>~/.weechat/irc.conf</code>.</p> |
143 | <h4 id="registering-your-nickname-1">Registering your nickname</h4> |
144 | <pre><code>/msg nickserv register <your-password> <your-email@example.com></code></pre> |
145 | <h4 id="adding-servers-and-credentials-1">Adding servers and credentials</h4> |
146 | <pre><code>/secure set libera.chat_password <your-password> |
147 | /server add libera.chat libera.chat/6697 -ssl |
148 | /set irc.server.libera.chat.username "<username>" |
149 | /set irc.server.libera.chat.password <your-password> |
150 | /set irc.server.libera.chat.autoconnect on |
151 | /set irc.server.libera.chat.autojoin "#coolchannel,#anothercoolchannel"</code></pre> |
152 | <h4 id="changing-your-password-1">Changing your password</h4> |
153 | <pre><code>/set irc.server.libera.chat.password <your-new-password> |
154 | /save</code></pre> |
155 | <h3 id="tweaks-and-tricks">Tweaks and tricks</h3> |
156 | <ul> |
157 | <li>Marking all buffers as read: <code>alt-h</code></li> |
158 | <li>Changing to an unread buffer: <code>alt-a</code></li> |
159 | <li>Scrolling up and down a buffer: <code>page up</code>/<code>page down</code></li> |
160 | <li>Scrolling through your mentions: <code>alt-n</code>/<code>alt-p</code></li> |
161 | <li>Redraw WeeChat: <code>ctrl-l</code></li> |
162 | <li>Click a link in the terminal: <code>ctrl click</code></li> |
163 | <li>Make long, wrapped links clickable: <code>alt-l</code> (Press <code>alt-l</code> again to return to the normal view)</li> |
164 | <li>Changing from buffers 1-9: <code>alt-<number></code></li> |
165 | <li>Changing from buffers 10-99: <code>alt-j <number></code></li> |
166 | <li>Changing to a buffer by name (allows tab-completion for names): |
167 | <ul> |
168 | <li><code>/buffer #friends-hangout</code></li> |
169 | <li><code>/buffer friends-hangout</code></li> |
170 | </ul></li> |
171 | <li>Setting an alias for <code>/buffer</code>: <code>/alias add b /buffer</code></li> |
172 | <li>Shortening timestamps: <code>/set weechat.look.buffer_time_format "%H:%M"</code></li> |
173 | <li>Disabling notifications for users who join and part a channel: <code>/set weechat.look.buffer_notify_default message</code></li> |
174 | <li>Limiting username length: <code>/set weechat.look.prefix_align_max 12</code></li> |
175 | <li>Limiting buffer name length: <code>/set weechat.bar.buflist.size_max 15</code></li> |
176 | <li>Limiting nickname length in the nickname list: <code>/set weechat.bar.nicklist.size_max 12</code></li> |
177 | <li>Turn off chat logging: <code>/set logger.level.irc 0</code> (Great if you run WeeChat on a server with limited storage)</li> |
178 | <li>Show/hide the buffer list: <code>/bar toggle buflist</code></li> |
179 | <li>Show/hide the nickname list: <code>/bar toggle nicklist</code></li> |
180 | </ul> |
181 | </main> |
182 | </body> |
183 | </html> |