weechat- me personal weechat setup 🔵🟢 |
git clone git://git.acid.vegas/weechat.git |
Log | Files | Refs | Archive | README |
README.md (21368B)
1 # WeeChat 2 > backup of me weechat setup 3 4 ![](preview.png) 5 6 ## Table of Contents 7 - [Setup](#setup) 8 - [WeeChat](#weechat) 9 - [Relay](#relay) 10 - [Docker](#docker) 11 - [Settings](#settings) 12 - [Appearance](#appearance) 13 - [Settings](#appearance) 14 - [IRC](#appearance) 15 - [CTCP](#appearance) 16 - [Scripts](#appearance) 17 - [Aliases](#aliases) 18 - [Triggers](#triggers) 19 - [Filters](#filters) 20 - [Servers](#servers) 21 - [Services](#services) 22 - [Proxy](#proxy) 23 - [Relay](#relay) 24 - [Keys](#keys) 25 - [Todo](#todo) 26 27 --- 28 29 ### Setup 30 ###### Repository for Debian (because Debian is always 7 versions behind to deem themself "stable") 31 ```shell 32 sudo mkdir /root/.gnupg 33 sudo chmod 700 /root/.gnupg 34 sudo mkdir -p /usr/share/keyrings 35 sudo gpg --no-default-keyring --keyring /usr/share/keyrings/weechat-archive-keyring.gpg --keyserver hkps://keys.openpgp.org --recv-keys 11E9DE8848F2B65222AA75B8D1820DB22A11534E 36 echo "deb [signed-by=/usr/share/keyrings/weechat-archive-keyring.gpg] https://weechat.org/debian bullseye main" | sudo tee /etc/apt/sources.list.d/weechat.list 37 sudo apt-get update 38 sudo apt-get install weechat-curses weechat-plugins weechat-python weechat-perl 39 ``` 40 41 ###### WeeChat 42 ```shell 43 git clone https://github.com/tat3r/tdfiglet.git && cd tdfiglet && make && sudo make install && cd 44 weechat -P "alias,buflist,charset,exec,fifo,fset,irc,logger,perl,python,relay,script,trigger,typing" -r "/set weechat.plugin.autoload alias,buflist,charset,exec,fifo,fset,irc,logger,perl,python,relay,script,trigger,typing;/save;/quit" 45 rm $HOME/.weechat/weechat.log && chmod 700 $HOME/.weechat && mkdir $HOME/.weechat/tls 46 git clone --depth 1 https://github.com/acidvegas/weechat.git $HOME/weechat 47 mv $HOME/weechat/alias.conf $HOME/.weechat/alias.conf && mv $HOME/weechat/scripts/perl/*.pl $HOME/.weechat/perl/autoload/ && mv $HOME/weechat/scripts/python/*.py $HOME/.weechat/python/autoload/ 48 mkdir $HOME/.weechat/logs 49 mkfifo $HOME/.weechat/weechat_fifo 50 openssl req -x509 -new -newkey rsa:4096 -sha256 -days 3650 -out $HOME/.weechat/tls/cert.pem -keyout $HOME/.weechat/tls/cert.pem 51 chmod 400 $HOME/.weechat/tls/cert.pem 52 ``` 53 54 ###### Relay 55 ```shell 56 certbot certonly --standalone -d chat.acid.vegas -m acid.vegas@acid.vegas 57 echo -e "[Unit]\nDescription=cerbot renewal\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/certbot renew -n --quiet --agree-tos --deploy-hook /home/acidvegas/.local/share/weechat/renew" > /etc/systemd/system/certbot.service 58 echo -e "[Unit]\nDescription=cerbot renewal timer\n\n[Timer]\nOnCalendar=0/12:00:00\nRandomizedDelaySec=1h\nPersistent=true\n\n[Install]\nWantedBy=timers.target" > /etc/systemd/system/certbot.timer 59 systemctl enable certbot.timer && systemctl start certbot.timer 60 61 echo "#!/bin/bash" > $HOME/.local/share/weechat/renew 62 echo "cat /etc/letsencrypt/live/chat.acid.vegas/fullchain.pem /etc/letsencrypt/live/chat.acid.vegas/privkey.pem > $HOME/.config/weechat/tls/relay.pem" >> $HOME/.local/share/weechat/renew 63 echo "chown -R acidvegas:acidvegas $HOME/.weechat/tls/relay.pem && chmod 400 $HOME/.confg/weechat/tls/relay.pem" >> $HOME/.local/share/weechat/renew 64 echo "printf \'%b\' \'*/relay tlscertkey\n\' > /run/user/1000/weechat/weechat_fifo" >> $HOME/.local/share/weechat/renew 65 chmod +x $HOME/.local/share/weechat/renew 66 67 mkdir -p $HOME/.config/systemd/user 68 echo -e "[Unit]\nDescription=headless weechat relay service\nAfter=network.target\n\n[Service]\nType=forking\nExecStart=/usr/bin/weechat-headless --daemon\n\n[Install]\nWantedBy=default.target" > $HOME/.config/systemd/user/weechat-headless.service 69 systemctl --user enable weechat-headless 70 ``` 71 72 --- 73 74 ### Settings 75 ###### Appearance 76 ``` 77 /set buflist.format.buffer "${if:${type}==server?${if:${window[gui_current_window].buffer.local_variables.server}==${buffer.local_variables.server}?${color:235,235}${format_number}${if:${irc_server.is_connected}?${color:green,235}:${color:lightred,235}}• ${color:default,235}${name}:${color:235,235}${format_number}${if:${irc_server.is_connected}?${color:green,235}:${color:lightred,235}}• ${color:default,235}${indent}${name}}:}${if:${type}=~(channel|private)?${format_number}${color_hotlist}${indent}${name}:}${if:${type}!~(channel|private|server)?${format_number}${color:gray} ${name}:}" 78 /set buflist.format.buffer_current "${if:${type}==server?${if:${window[gui_current_window].buffer.local_variables.server}==${buffer.local_variables.server}?${color:lightred}${if:${irc_server.is_connected}?${color:235,235}${format_number}${color:green,235}:${color:lightred,235}}• ${name}${format_hotlist}:${color:237}${if:${irc_server.is_connected}?${color:235,235}${format_number}${color:green,235}:${color:lightred,235}}• ${name}}${format_lag}${format_hotlist}:${if:${type}=~(channel|private)?${format_number}• ${color:lightgreen}${name}:${if:${type}!~(channel|private|server)?${format_number}${color:lightgreen} ${name}:}}}" 79 /set buflist.format.hotlist_highlight "${color:yellow}" 80 /set buflist.format.hotlist_message "${color:cyan}" 81 /set buflist.format.hotlist_private "${color:yellow}" 82 /set buflist.format.number "${color:235}${number}${if:${number_displayed}? │: }" 83 /set irc.color.input_nick default 84 /set irc.color.nick_prefixes "y:green;q:green;a:lightred;o:red;h:yellow;v:lightblue;*:lightmagenta" 85 /set irc.color.reason_quit darkgray 86 /set irc.color.topic_new lightblue 87 /set irc.look.display_join_message "" 88 /set irc.look.display_old_topic off 89 /set irc.look.item_nick_modes off 90 /set irc.look.server_buffer independent 91 /set weechat.bar.buflist.size_max 20 92 /set weechat.bar.fset.separator off 93 /set weechat.bar.input.color_delim darkgray 94 /set weechat.bar.input.conditions "${window.buffer.full_name} != highmon" 95 /set weechat.bar.input.items "[input_prompt]+(away),[input_search],[input_paste],input_text" 96 /set weechat.bar.input.separator off 97 /set weechat.bar.nicklist.size_max 15 98 /set weechat.bar.status.color_bg default 99 /set weechat.bar.status.color_delim darkgray 100 /set weechat.bar.status.conditions "${window.buffer.full_name} != highmon" 101 /set weechat.bar.status.items "buffer_name+(buffer_modes)+[buffer_nicklist_count]" 102 /set weechat.bar.status.separator off 103 /set weechat.bar.title.color_bg black 104 /set weechat.bar.title.separator off 105 /set weechat.bar.title.size_max 2 106 /set weechat.color.chat_delimiters darkgray 107 /set weechat.color.chat_highlight_bg default 108 /set weechat.color.chat_host darkgray 109 /set weechat.color.chat_nick white 110 /set weechat.color.chat_nick_colors "cyan,magenta,green,brown,lightblue,default,lightcyan,lightmagenta,lightgreen,blue,31,35,38,40,49,63,70,80,92,99,112,126,130,138,142,148,160,162,167,169,174,176,178,184,186,210,212,215,247" 111 /set weechat.color.chat_prefix_error lightred 112 /set weechat.color.chat_prefix_network lightblue 113 /set weechat.color.chat_prefix_suffix darkgray 114 /set weechat.color.chat_read_marker darkgray 115 /set weechat.color.chat_time 235 116 /set weechat.color.chat_time_delimiters 235 117 /set weechat.color.separator darkgray 118 /set weechat.look.bar_more_down "▼" 119 /set weechat.look.bar_more_left "◀" 120 /set weechat.look.bar_more_right "▶" 121 /set weechat.look.bar_more_up "▲" 122 /set weechat.look.buffer_time_format " %H:%M" 123 /set weechat.look.chat_space_right on 124 /set weechat.look.day_change off 125 /set weechat.look.item_buffer_filter "•" 126 /set weechat.look.prefix_align_max 15 127 /set weechat.look.prefix_join "▬▬▶" 128 /set weechat.look.prefix_quit "◀▬▬" 129 /set weechat.look.prefix_suffix "│" 130 /set weechat.look.quote_time_format "%H:%M" 131 /set weechat.look.read_marker_string "─" 132 /set weechat.look.separator_horizontal "─" 133 /set weechat.look.separator_vertical "│" 134 /set weechat.look.window_title "hardchats" 135 /set weechat.startup.display_logo off 136 /set weechat.startup.display_version off 137 ``` 138 139 ###### Settings 140 ``` 141 /set buflist.look.mouse_wheel off 142 /set buflist.look.mouse off 143 /set irc.look.buffer_switch_autojoin off 144 /set irc.look.buffer_switch_join on 145 /set irc.look.join_auto_add_chantype on 146 /set irc.look.smart_filter off 147 /set irc.look.temporary_servers on 148 /set irc.look.typing_status_nicks on 149 /set irc.network.ban_mask_default "*!*@$host" 150 /set sec.crypt.hash_algo sha512 151 /set typing.look.enabled_nicks on 152 /set weechat.look.confirm_quit on 153 /set weechat.look.highlight "acidvegas,supernets,super nets" 154 /set weechat.look.mouse on 155 /set weechat.plugin.autoload "alias,buflist,charset,exec,fifo,fset,irc,logger,perl,python,relay,script,trigger" 156 /set logger.file.color_lines on 157 /set logger.file.auto_log off 158 /set logger.look.backlog 0 159 /set logger.file.rotation_compression_type gzip 160 /set logger.file.rotation_compression_level 80 161 /set logger.file.rotation_size_max "1g" 162 /set logger.file.time_format "%Y-%m-%d %H:%M" 163 /set logger.level.irc 0 164 /set logger.level.core.weechat 0 165 /set logger.mask.irc "$server/$channel.log" 166 167 ``` 168 169 ###### IRC 170 ``` 171 /set irc.server_default.anti_flood_prio_high 0 172 /set irc.server_default.anti_flood_prio_low 0 173 /set irc.server_default.autorejoin on 174 /set irc.server_default.autorejoin_delay 3 175 /set irc.server_default.command_delay 3 176 /set irc.server_default.msg_part "G-line: User has been permanently banned from this network." 177 /set irc.server_default.msg_quit "G-line: User has been permanently banned from this network." 178 /set irc.server_default.nicks "acidvegas,acid_vegas,acid.vegas,acidvegas_" 179 /set irc.server_default.realname "04MOST DANGEROUS MOTHERFUCK‮" 180 /set irc.server_default.sasl_fail continue 181 /set irc.server_default.sasl_mechanism external 182 /set irc.server_default.sasl_username "acidvegas" 183 /set irc.server_default.tls_cert "%h/tls/cert.pem" 184 /set irc.server_default.tls_password "REDACTED" 185 /set irc.server_default.tls_verify off 186 /set irc.server_default.username "stillfree" 187 ``` 188 189 ###### CTCP 190 ``` 191 /set irc.ctcp.clientinfo "" 192 /set irc.ctcp.finger "" 193 /set irc.ctcp.ping "" 194 /set irc.ctcp.source "" 195 /set irc.ctcp.time "" 196 /set irc.ctcp.userinfo "" 197 /set irc.ctcp.version "" 198 /set irc.look.ctcp_time_format "" 199 /set irc.look.display_ctcp_blocked off 200 /set irc.look.display_ctcp_reply off 201 /set irc.look.display_ctcp_unknown off 202 ``` 203 204 ###### Scripts 205 ``` 206 /set plugins.var.perl.antifuck.autopart 1 207 /set plugins.var.perl.antifuck.nobufs 1 208 /set plugins.var.perl.fuckyou.forcejoin SAJOIN 209 /set plugins.var.perl.fuckyou.forcepart SAPART 210 /set plugins.var.perl.fuckyou.furry &ENTERTHEVOID 211 /set plugins.var.perl.fuckyou.parallel 25 212 /set plugins.var.perl.keepnick.default_enable 1 213 ``` 214 215 --- 216 217 ### Aliases 218 219 See [alias.conf](https://github.com/acidvegas/weechat/blob/master/alias.conf) file. 220 221 --- 222 223 ### Triggers 224 ``` 225 /trigger del beep 226 /trigger add hate modifier irc_out1_PRIVMSG "" "/hate/04 HATE " 227 /trigger add input_command_color modifier "500|input_text_display" "${tg_string} =~ ^/($|[^/])" "#/(.+)#${color:39}/${color:74}${re:1}#" 228 /trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none" 229 /trigger add url_color modifier "weechat_print" "${tg_tags} !~ irc_quit" ";[a-z]+://\S+;${color:32}${color:underline}${re:0}${color:-underline}${color:reset};" "" 230 /trigger add relay_away_off signal relay_client_connected "" "" "/away -all" 231 /trigger add relay_away_on signal relay_client_disconnected "${info:relay_client_count,connected} == 0" "" "/away -all I am away" 232 ``` 233 234 - Highlight monitor *(This can cmpletely replace [highmon.pl](https://weechat.org/scripts/source/highmon.pl.html/))* 235 ``` 236 /trigger add highmon_like print "*;irc_privmsg" 237 /trigger set highmon_like conditions "${tg_highlight} == 1 && ${tg_displayed} == 1 && ${buffer.local_variables.type} == channel" 238 /trigger set highmon_like command "/print -newbuffer highmon -tags ${tg_tags} ${color:${info:nick_color_name,${server}}}${color:${weechat.color.chat_prefix_more}}${weechat.look.prefix_buffer_align_more}${color:${info:nick_color_name,${channel}}}${channel}\t${if:${tg_tags} !~ ,irc_action,?${weechat.look.quote_nick_prefix}${tg_prefix}${color:reset}${weechat.look.quote_nick_suffix}:${tg_prefix}${color:reset}} ${tg_message}" 239 ``` 240 241 --- 242 243 ### Filters 244 245 **NOTE:** All filters can be toggled on/off with the `ALT + =` keyboard shortcut. 246 247 - Hide everything that is not a channel message *(useful for reading backlog)*: 248 249 `/filter add crap * irc_join,irc_part,irc_quit,irc_mode,irc_topic,irc_nick,irc_account,irc_quit *` 250 251 --- 252 253 ### Servers 254 ``` 255 /server add 2f30 irc.2f30.org/6697 -tls 256 /server add anope irc.anope.org/6697 -tls 257 /server add blackcatz irc.blackcatz.org/6697 -tls 258 /server add blcknd irc.blcknd.net/6697 -tls 259 /server add buttes irc.buttes.org/6697 -tls 260 /server add efnet irc.servercentral.net/9999 -tls 261 /server add libera irc.libera.chat/6697 -tls 262 /server add gamesurge irc.gamesurge.net 263 /server add gangnet irc.gangnet.ru -tls 264 /server add hackint irc.hackint.org/6697 -tls 265 /server add irc irc.internetrelaychat.net/6697 -tls 266 /server add ircstorm irc.ircstorm.net/6699 -tls 267 /server add malvager irc.malvager.net/6697 -tls 268 /server add oftc irc.oftc.net/6697 -tls 269 /server add sandnet irc.sandngz.net/6697 -tls 270 /server add silph irc.silph.co/6697 -tls 271 /server add supernets irc.supernets.org/6697 -tls 272 /server add tcpdirect ircd.chat/6697 -tls 273 /server add terahertz irc.terahertz.net/6697 -tls 274 /server add unreal irc.unrealircd.org/6697 -tls 275 /server add wigle wigle.net -tls 276 /server add wormnet wormnet1.team17.com 277 /server add wtfux irc.wtfux.org/6697 -tls 278 279 /set irc.server.2f30.autojoin #2f30 280 /set weechat.notify.irc.22f30 highlight 281 /set irc.server.anope.autojoin #anope 282 /set irc.serber.blackcatz #blackcatz 283 /set irc.server.blcknd.autojoin #blcknd,#chat 284 /set irc.server.buttes.autojoin #gamme 285 /set irc.server.efnet.autojoin #2600,#efnetnews,#exchange,#irc30,#lrh 286 /set irc.server.gamesurge.autojoin #nfo-support,#worms 287 /set weechat.notify.irc.gamesurge highlight 288 /set irc.server.irc.autojoin #h4x 289 /set irc.server.ircstorm.autojoin #schizophrenia 290 /set irc.server.libera.autojoin #archlinux,#ircv3,#matrix,#music-theory,#python,#raspberrypi,#weechat 291 /set weechat.notify.irc.libera message 292 /set irc.server.malvager.autojoin #malvager 293 /set irc.server.sandnet.autojoin #arab 294 /set irc.server.sandnet.away_check 60 295 /set irc.server.silph.autojoin #ramen 296 /set irc.server.supernets.away_check 60 297 /set irc.server.tcpdirect.autojoin #tcpdirect 298 /set irc.server.terahertz.autojoin #ix 299 /set irc.server.unreal.autojoin #unreal-support,#superbowl,#syzop-smells 300 /set irc.server.unreal.command /MODE acidvegas -x 301 /set irc.server.wigle.autojoin #wigle 302 /set irc.server.wormnet.autojoin #anythinggoes 303 /set irc.server.wormnet.password ELSILRACLIHP 304 /set irc.server.wormnet.realname "48 0 US 3.7.2.1" 305 /set weechat.notify.irc.wormnet highlight 306 /set irc.server.wtfux.autojoin #ED,#wtfux 307 308 ``` 309 310 --- 311 312 ### Services 313 ``` 314 /secure passphrase PASSWORD 315 /secure set NETWORK PASSWORD 316 /set irc.server.networkname.command "/msg NickServ IDENTIFY ${sec.data.networkname} 317 318 /msg NickServ register PASSWORD EMAIL 319 /msg NickServ ACCESS DEL CHANGEME 320 /msg NickServ ACCESS ADD *@big.dick.acid.vegas 321 /msg NickServ AJOIN ADD <channel> 322 /msg NickServ CERT ADD 323 /msg NickServ SET AUTOOP ON 324 /msg NickServ SET HIDE EMAIL ON 325 /msg NickServ SET HIDE STATUS ON 326 /msg NickServ SET HIDE USERMASK ON 327 /msg NickServ SET HIDE QUIT ON 328 /msg NickServ SET KEEPMODES ON 329 /msg NickServ SET KILL QUICK 330 /msg NickServ SET PRIVATE ON 331 /msg NickServ SET SECURE ON 332 /msg HostServ REQUEST MOST.DANGEROUS.MOTHER.FUCK 333 /msg HostServ ON 334 335 ``` 336 337 --- 338 339 ### Proxy 340 ``` 341 /proxy add tor socks5 127.0.0.1 9050 342 /set irc.server.CHANGEME.proxy tor 343 ``` 344 345 --- 346 347 ### Relay 348 ``` 349 /secure set relay PASSWORD 350 /secure set totp SECRET 351 /set relay.network.max_clients 2 352 /set relay.network.password ${sec.data.relay} 353 /set relay.network.totp_secret ${sec.data.totp} 354 /relay tlscertkey 355 /relay add tls.weechat PORT 356 ``` 357 358 --- 359 360 ### Keys 361 | Keys | Description | Command | 362 | --------- | ------------------------------------- | ----------------------------------- | 363 | `ALT + n` | Scroll to next highlight | `/window scroll_next_highlight` | 364 | `ALT + p` | Scroll to previous highlight | `/window scroll_previous_highlight` | 365 | `ALT + u` | Scroll to first unread line in buffer | `/window scroll_unread` | 366 367 | Keys | Description | Command | 368 | ------------- | ------------------------ | ----------------------------- | 369 | `Left` | Move cursor to the left | `/input move_previous_char` | 370 | `Right` | Move cursor to the right | `/input move_next_char` | 371 | `Backspace` | Delete character | `/input delete_previous_char` | 372 | `Enter` | Send | `/input return` | 373 | `ALT + Enter` | Insert new line | `/input insert \n` | 374 375 | Keys | Description | Command | 376 | ------------------ | ------------------- | ------------------------- | 377 | `CTRL + r` | Search text | `/input search_text_here` | 378 | `CTRL + y` | Paste | `/input clipboard_paste` | 379 | `CTRL + l` | Refresh window | `/window refresh` | 380 | `ALT + l` | Toggle bare display | `/window bare` | 381 | `Alt + Shift + b` | Toggle buffer list | `/bar toggle buflist` | 382 | `Alt + Shift + n` | Toggle nicklist | `/bar toggle buflist` | 383 384 | Keys | Description | Command | 385 | ------------- | ------------------- | -------------------------- | 386 | `Tab` | Complete next | `/input complete_next` | 387 | `Shift + Tab` | Complete previous | `/input complete_previous` | 388 389 | Keys | Description | Command | 390 | ------------- | ---------------------------------- | -------------------------------- | 391 | `Up` | Show previous input history | `/input history_previous` | 392 | `Down` | Show next input history | `/input history_next` | 393 | `CTRL + Up` | Show previous global input history | `/input history_global_previous` | 394 | `CTRL + Down` | Show next global input history | `/input history_global_next` | 395 396 | Keys | Description | Command | 397 | ------------ | --------------------- | ------------ | 398 | `ALT + #` | Go to Nth buffer | `/buffer *N` | 399 | `ALT + Up` | Go to previous buffer | `/buffer -1` | 400 | `ALT + Down` | Go to next buffer | `/buffer +1` | 401 402 | Keys | Description | Command | 403 | ------------ | ----------------------------------------- | ----------------------- | 404 | `PgUp` | Scroll up one page in buffer history | `/window page_up` | 405 | `PgDn` | Scroll down one page in buffer history | `/window page_down` | 406 | `ALT + PgUp` | Scroll up a few lines in buffer history | `/window scroll_up` | 407 | `ALT + PgDn` | Scroll down a few lines in buffer history | `/window scroll_down` | 408 | `ALT + Home` | Scroll to top of buffer | `/window scroll_top` | 409 | `ALT + End` | Scroll to bottom of buffer | `/window scroll_bottom` | 410 411 | Keys | Description | Command | 412 | -------------- | ------------------------------- | -------------------- | 413 | `Ctrl + c, b` | Insert code for bold text | `/input insert \x02` | 414 | `Ctrl + c, c` | Insert code for colored text | `/input insert \x03` | 415 | `Ctrl + c, i` | Insert code for italic text | `/input insert \x1D` | 416 | `Ctrl + c, o` | Insert code for color reset | `/input insert \x0F` | 417 | `Ctrl + c, v` | Insert code for reverse color | `/input insert \x16` | 418 | `Ctrl + c, _` | Insert code for underlined text | `/input insert \x1F` | 419 420 ___ 421 422 ###### Mirrors for this repository: [acid.vegas](https://git.acid.vegas/weechat) • [SuperNETs](https://git.supernets.org/acidvegas/weechat) • [GitHub](https://github.com/acidvegas/weechat) • [GitLab](https://gitlab.com/acidvegas/weechat) • [Codeberg](https://codeberg.org/acidvegas/weechat)