Weechat configuration: Difference between revisions
From wikinotes
(13 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
|} | |} | ||
</blockquote><!-- locations --> | </blockquote><!-- locations --> | ||
= Environment = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| <code>$WEECHAT_HOME</code> || specify alt weechat config | |||
|- | |||
|} | |||
</blockquote><!-- Environment --> | |||
= Cli = | |||
<blockquote> | |||
There are a couple of options to specify alt configurations for weechat on the cli | |||
<syntaxhighlight lang="bash"> | |||
WEECHAT_HOME=/some/path weechat # use '/some/path' as config dir | |||
weechat --dir /some/path # use '/some/path' as config dir | |||
weechat --temp-dir # create/delete a tempdir for weechat on exit | |||
</syntaxhighlight> | |||
</blockquote><!-- Cli --> | |||
= Dynamic Configuration = | = Dynamic Configuration = | ||
Line 28: | Line 47: | ||
/set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" # archlinux | /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" # archlinux | ||
/set weechat.network.gnutls_ca_file "/usr/local/share/certs/ca-root-nss.crt" # freebsd | /set weechat.network.gnutls_ca_file "/usr/local/share/certs/ca-root-nss.crt" # freebsd | ||
</source> | |||
temporary connections | |||
<syntaxhighlight lang="bash"> | |||
/set irc.look.temporary_servers on # enable temporary servers | /set irc.look.temporary_servers on # enable temporary servers | ||
/connect chat.freenode.net/6697 -ssl # test ssl (without remembering connection) | /connect chat.freenode.net/6697 -ssl # test ssl (without remembering connection) | ||
</ | </syntaxhighlight> | ||
persistent connections | |||
<syntaxhighlight lang="bash"> | |||
/server add libera irc.libera.chat/6697 -ssl -autoconnect # add/save server | |||
</syntaxhighlight> | |||
</blockquote><!-- ssl setup --> | </blockquote><!-- ssl setup --> | ||
Line 58: | Line 84: | ||
= Keybindings = | = Keybindings = | ||
<blockquote> | <blockquote> | ||
Try a keybinding (unbound on exit) | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
/key bind ctrl-T /fzf # bind '/fzf' to 'ctrl-t' | /key bind ctrl-T /fzf # bind '/fzf' to 'ctrl-t' | ||
</syntaxhighlight> | |||
Configure a keybinding | |||
<syntaxhighlight lang="bash"> | |||
# ~/.weechat/weechat.conf | |||
[key] | |||
ctrl-T = "/fzf" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Keybindings --> | </blockquote><!-- Keybindings --> | ||
Line 65: | Line 100: | ||
= Secure Passphrases = | = Secure Passphrases = | ||
<blockquote> | <blockquote> | ||
Load weechat's passwords on startup (loading login pass from pass) | |||
<syntaxhighlight lang="bash"> | |||
/set sec.crypt.passphrase_command "/usr/bin/pass show foo/passwd" | |||
/save | |||
</syntaxhighlight> | |||
Manage with weechat | |||
<source lang="bash"> | <source lang="bash"> | ||
/secure passphrase your-unlock-passprhase | /help secure # help | ||
/secure # list managed data | |||
/secure passphrase your-unlock-passprhase # set password | |||
/secure passphrase -delete # unsets password (existing data becomes plaintext) | |||
/secure set yourvariable value | /secure set yourvariable value | ||
/msg NickServ identify "${sec.data.yourvariable}" | /msg NickServ identify "${sec.data.yourvariable}" | ||
</source> | </source> | ||
You can see all values recorded to variables in <code>irc.conf</code>.<br> | |||
Actual values are encrypted within <code>sec.conf</code>. | |||
</blockquote><!-- secure passprhases --> | </blockquote><!-- secure passprhases --> | ||
= Nick configuration = | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
/nick {yournick} | |||
/msg identify nickserv {password} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="dosini"> | |||
# these will be displayed in join logs, default to your system login | |||
{server}.username = '{desired_name}' # appears in user@host | |||
{server}.realaname = '{desired_name}' # appears in /whois requests | |||
</syntaxhighlight> | |||
</blockquote><!-- Nick configuration --> | |||
= Proxy IRC through TOR = | = Proxy IRC through TOR = |
Latest revision as of 02:30, 26 August 2023
Locations
~/.weechat/irc.conf
server configuration
Environment
$WEECHAT_HOME
specify alt weechat config
Cli
There are a couple of options to specify alt configurations for weechat on the cli
WEECHAT_HOME=/some/path weechat # use '/some/path' as config dir weechat --dir /some/path # use '/some/path' as config dir weechat --temp-dir # create/delete a tempdir for weechat on exit
Dynamic Configuration
weechat can be configured dynamically (from the IRC prompt), or within configuration files.
/script install iset.pl # install interactive-set /iset # enable interactive-set /set filename.section.directive # interactively set configuration option /save # save all changes to configuration
SSL setup
# configure SSL /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" # archlinux /set weechat.network.gnutls_ca_file "/usr/local/share/certs/ca-root-nss.crt" # freebsdtemporary connections
/set irc.look.temporary_servers on # enable temporary servers /connect chat.freenode.net/6697 -ssl # test ssl (without remembering connection)persistent connections
/server add libera irc.libera.chat/6697 -ssl -autoconnect # add/save server
Aliases
/alias add i /msg nickserv identify /alias add j /join /alias add b /buffer
Filters
Filters can be used to hide information from buffers.
Alt + =
toggles filters on/off./filter add joinquit * irc_join,irc_part,irc_quit *
Keybindings
Try a keybinding (unbound on exit)
/key bind ctrl-T /fzf # bind '/fzf' to 'ctrl-t'Configure a keybinding
# ~/.weechat/weechat.conf [key] ctrl-T = "/fzf"
Secure Passphrases
Load weechat's passwords on startup (loading login pass from pass)
/set sec.crypt.passphrase_command "/usr/bin/pass show foo/passwd" /saveManage with weechat
/help secure # help /secure # list managed data /secure passphrase your-unlock-passprhase # set password /secure passphrase -delete # unsets password (existing data becomes plaintext) /secure set yourvariable value /msg NickServ identify "${sec.data.yourvariable}"You can see all values recorded to variables in
irc.conf
.
Actual values are encrypted withinsec.conf
.
Nick configuration
/nick {yournick} /msg identify nickserv {password}# these will be displayed in join logs, default to your system login {server}.username = '{desired_name}' # appears in user@host {server}.realaname = '{desired_name}' # appears in /whois requests
Proxy IRC through TOR
See https://weechat.org/files/doc/devel/weechat_user.en.html#irc_tor_freenode