118 views
# Weechat Quickstart I use a 100x30 terminal window with tmux running weechat, the visual settings below are tuned to keep it from looking like a mess. Really long nicknames start resizing the weechat windows/buffers when left at the default settings. ## Core Settings Buffer config settings; restart weechat before adding/joining servers: ``` /set irc.look.server_buffer independent /set irc.look.new_channel_position near_server /set irc.look.new_pv_position near_server /set weechat.look.buffer_time_format "%H:%M" /secure passphrase xxxxxxxxx /save ``` Set a hard max size on buflist, chat and nicklist (100x30 terminal): ``` /set weechat.bar.buflist.size_max 17 /set weechat.look.prefix_align_max 11 /set weechat.bar.nicklist.size_max 15 ``` Filter out join/part/quit (see `/fset irc.look.smart*`) ``` /filter add irc_smart * irc_smart_filter * ``` Set default user info: ``` /set irc.server_default.nicks "nick,nick1,nick2,nick3,nick4" /set irc.server_default.username "nick" /set irc.server_default.realname "nick" ``` Reduce the amount of personal information shared: ``` /set logger.file.auto_log off /set irc.server_default.msg_part "" /set irc.server_default.msg_quit "" /set irc.ctcp.clientinfo "" /set irc.ctcp.finger "" /set irc.ctcp.source "" /set irc.ctcp.time "" /set irc.ctcp.userinfo "" /set irc.ctcp.version "" /set irc.ctcp.ping "" ``` More settings to help secure, filter and anonymize to taste: - http://www.futurile.net/2020/11/29/weechat-configuration-for-irc-and-slack/ ## Networks and Channels [Reference](https://en.wikipedia.org/wiki/Wikipedia:IRC/Channel_access_and_configuration_guide) Configure **Tilde**, **Libera** and/or **OFTC**: ``` /server add tilde irc.tilde.chat/6697 -ssl /set irc.server.tilde.nicks "nick,nick2,nick3" /set irc.server.tilde.username "nick" /set irc.server.tilde.realname "nick" /server add libera irc.libera.chat/6697 -ssl /set irc.server.libera.nicks "nick,nick2,nick3" /set irc.server.libera.username "nick" /set irc.server.libera.realname "nick" /server add oftc irc.oftc.net/6697 -ssl /set irc.server.oftc.nicks "nick,nick2,nick3" /set irc.server.oftc.username "nick" /set irc.server.oftc.realname "nick" ``` Protect your login on **Tilde** or **Libera**: ``` /connect tilde /msg nickserv register <password> <email> /secure set tilde_password xxxxxxxxxxx /set irc.server.tilde.sasl_username "nick" /set irc.server.tilde.sasl_password "${sec.data.tilde_password}" /connect libera /msg nickserv register <password> <email> /secure set libera_password xxxxxxxxxxx /set irc.server.libera.sasl_username "nick" /set irc.server.libera.sasl_password "${sec.data.libera_password}" ``` Potect your login on **OFTC** - [Nickserv Validation](https://services.oftc.net/): ``` /connect oftc /msg nickserv register <password> <email> /secure set oftc_password xxxxxxxxxxx /set irc.server.oftc.command "/eval /msg nickserv identify ${sec.data.oftc_password}" ``` Cloak request on **Tilde** (use a fake domain name): ``` /msg HostServ request random.tld ``` Tilde requires an admin to manually assign your cloak, read the instructions on-screen. Cloak yourself on **Libera**: ``` /j #libera-Cloak !cloakme ``` Cloak yourself on **OFTC**: ``` /msg nickserv set cloak on ``` Automatically join things: ``` /set irc.server.tilde.autoconnnect on /set irc.server.tilde.autojoin "#chan1,##chan2" /set irc.server.libera.autoconnect on /set irc.server.libera.autojoin "#chan1,##chan2" /set irc.server.oftc.autoconnect on /set irc.server.oftc.autojoin "#chan1,##chan2" ``` Set up a channel to keep running on it's own on **Libera**: ``` /j ##foobar /msg chanserv register ##foobar /msg chanserv flags ##foobar nick_of_other_founder +F /msg chanserv flags ##foobar nick_of_other_op +votsriRefA /msg chanserv set ##fobar guard on ``` ## Keyboard Shortcuts [Reference](https://weechat.org/files/doc/stable/weechat_user.en.html#key_bindings) The below table reflects common keystrokes which actually work in my `mate-terminal`: | Shortcut | Command | Description | |------------ |----------------------------- |--------------------------------------------- | | Pgup | | Move up one page in the channel scrollback | | Alt+Home | | Move to beginning of the channel scrollback | | PgDn | | Move down one page in the channel scrollback | | Alt+End | | Move to the end of the channel scrollback | | F5 | /buffer -1 | Switch to previous buffer | | F6 | /buffer +1 | Switch to next buffer | | Alt+# | /buffer # | Switch to numbered buffer 1-9 | | Alt+j,## | /buffer ## | Switch to numbered buffer 10-99 | | Alt+l | /window bare | Switch to bare display of current window | | F7 | /window -1 | Switch to previous window | | F8 | /window +1 | Switch to next window | | Ctrl+F1 | /bar scroll buflist * -100% | Scroll up one page in buffer list | | Ctrl+F2 | /bar scroll buflist * +100% | Scroll down one page in buffer list | | Alt+F11 | /bar scroll nicklist * b | Scroll to beginning of nick list | | Alt+F12 | /bar scroll nicklist * e | Scroll to end of nick list | F11 is typically trapped as "Full Screen" by many Linux desktops; F1, F2, Alt+F1, Alt+F2, Ctrl+F11 and Ctrl+F12 are usually trapped for other desktop actions as well. Some documented keystrokes such as Alt+PgUp simply do nothing for me and seem dead, however documentation indicates they should work so your mileage may vary depending on specific terminal type being used. ### Mapping Keys | Shortcut | Command | Description | |------------ |----------------------------- |-------------------------------------- | | Ctrl+F9 | /bar scroll title * -30% | Scroll buffer’s title on the left | | Ctrl+F10 | /bar scroll title * +30% | Scroll buffer’s title on the right | | Ctrl+F11 | /bar scroll nicklist * -100% | Scroll Scroll up one page in nicklist | | Ctrl+F12 | /bar scroll nicklist * +100% | Scroll down one page in nicklist | The default bindings for `F9` / `F10` are trapped by the window manager and have no alternate binding. By default `Ctrl+F9` and `Ctrl+F10` are not used, so we can map those to the same actions: ``` /key bind meta2-20;5~ /bar scroll title * -30% /key bind meta2-21;5~ /bar scroll title * +30% ``` The official documentation indicates `Ctrl+F11` / `Ctrl+F12` are mapped to scrolling the nicklist buffer, however they do not seem to actually work out of the box. Map them as documented: ``` /key bind meta2-23;5~ /bar scroll nicklist * -100% /key bind meta2-24;5~ /bar scroll nicklist * +100% ``` To map a keystroke without knowing it's code ("meta2-20;5~" e.g.), type `Alt-k` and then type the keystroke to map and weechat will insert the correct code for you.