「WeeChat」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎ヒントとテクニック‎: 絵文字を翻訳して追加)
(→‎ヒントとテクニック‎: マウスのサポートを翻訳して追加)
138行目: 138行目:
 
* [[alacritty]]
 
* [[alacritty]]
 
* [[rxvt-unicode]]
 
* [[rxvt-unicode]]
  +
  +
=== マウスのサポート ===
  +
  +
ターミナルエミュレータはマウススクロールイベントを通過し、weechat は [https://weechat.org/files/doc/stable/weechat_user.en.html#screen_layout スクロールイン領域] を通過します。
  +
  +
* チャットエリア
  +
* ニックネームリストバー
  +
  +
==== tmux 内のマウス ====
  +
  +
[[tmux]] で実行する場合は、{{ic|~/.tmux.conf}} でマウスのサポートをオンにします。
  +
  +
set -g mouse on
   
 
=== Slack IRC ゲートウェイ ===
 
=== Slack IRC ゲートウェイ ===

2023年11月16日 (木) 18:50時点における版

関連記事

WeeChat は高い拡張性を誇る機能豊富な IRC クライアントです。現在も活発に開発されています。

インストール

公式リポジトリから weechatインストールしてください。開発版は AURweechat-gitAUR でインストールできます。

実行

WeeChat は複数のインターフェイスを備えられるようになっています。weechat-[interface] を実行して WeeChat を起動してください。

現在のところ WeeChat には Ncurses インターフェイスしかありません。WeeChat の起動コマンドは:

$ weechat

設定

デフォルトでは、WeeChat は設定ファイルを XDG directory に保存します。WeeChat はいつでもファイルを書き込む可能性があるため、これらのファイルを直接編集することはお勧めできません。[1]

代わりに、/set コマンド を使用する必要があります。WeeChat バッファウィンドウで /set を実行すると、設定可能なすべてのオプションのリストを取得できます。デフォルトの設定可能なオプションは 600 近くあるため、ワイルドカード構文 (例として /set irc.server.* または /set *server*) を使用して検索できます。/help コマンドを使用すると、各オプションのヘルプを表示できます。

/help irc.server.libera.autoconnect
ヒント: すべての設定ファイルを単一のディレクトリに置きたい場合 (~/.weechat など)、このオプションを使用します: $ weechat -d $HOME/.weechat または環境変数 WEECHAT_HOME

サーバーに接続

IRC サーバーに接続するには、サーバーを追加してから /connect を使用します:

/server add libera irc.libera.chat/6697
/connect libera

詳細については、WeeChat のドキュメントと /help server を参照してください。

ノート: 事前にサーバーを追加せずに、/connect を使用した一時的なサーバー接続は許可されません。この機能を有効にするには、最初に /set irc.look.temporary_servers on を使用します。

サーバープロファイルの作成

If you plan on connecting to a server more than once it may be beneficial to create a Server.

/server add example irc.example.net/6667

Would create the server example which would connect to irc.example.net on port 6667

See the WeeChat documentation and /help server for more information.

SSL の設定

libera (#archlinux を含む) を含む多くの IRC サーバーは SSL をサポートしています。

/server でサーバーを作成している場合は、SSL ポート (通常は 6697) と -tls を行の最後に追加します。例えば:

/server add libera irc.libera.chat/6697 -tls
ノート: 一部のサーバーでは、ssl_dhkey_size の値をより低い値に変更する必要があります。たとえば、Libera を使用している場合は、コマンド /set irc.server.libera.tls_dhkey_size 1024 または /set irc.server.libera.tls_dhkey_size 1024 コマンドで値を設定する必要があります。(サーバーログを参照)

ヒントとテクニック‎

アップグレード

WeeChat は、IRC サーバーから切断せずにアップグレードできます (非 SSL 接続のみ):

/upgrade

これにより、新しい WeeChat バイナリがロードされ、現在の設定が再ロードされます。

エイリアス

エイリアスを作成して、一般的に実行されるコマンドを簡素化できます。良い例は、Wraithan の Smart Filter エイリアスです。

Smart Filter

まず、Smart Filter を有効にする必要があります。

/set irc.look.smart_filter "on"

次に、sfilter エイリアスを作成します。

/alias sfilter filter add irc_smart_$server_$channel irc.$server.$channel irc_smart_filter *

入力できるようになりました

/sfilter

任意のバッファにある場合、Smart Filter はそのバッファに対してのみ有効になります。

次のエイリアスは、現在のバッファーで以前に有効化された Smart Filter を削除する。エイリアスを追加します:

/alias rmsfilter filter del irc_smart_$server_$channel

実行

/rmsfilter

Exec コマンド

"exec" という新しいプラグインが追加され、コマンドは /exec です。外部コマンドを実行し、-o オプションを使用して現在のバッファに出力を表示することも、ローカル (デフォルト) で出力を表示することもできます。

キーバインド

参照 /help key

基本的な irssi スタイルのウィンドウスクロールを追加する例:

/key bind meta-p /window page_up
/key bind meta-n /window page_down

vimode プラグインを使用している場合、デフォルトのバインディングのほとんどは機能せず、vim のような代替手段が必要になります。バインディング を確認してください。

アイドル時に SSH の接続が切れる

SSH を使ってリモートシェルから WeeChat に接続している場合、例えば GNU Screentmux で WeeChat を実行している場合、アイドル状態でしばらくすると接続が切断されることがあります。この現象が発生する原因は複数ありますが、解決する最も簡単な方法はリモートシェル上の SSH 設定にこの設定を追加することで接続を強制的に維持することです。

これは WeeChat 自体とは関係ありませんが、アイドル時に接続が切断されることは代替の irssi ではデフォルトで起こりません。

# /etc/ssh/sshd_config
ClientAliveInterval 300

または、Mosh をご覧ください。

絵文字

絵文字はUnicodeセットの一部です。絵文字の要件:

  • ターミナルエミュレータはユニコードと絵文字サブセットをサポートしている必要があります。
  • ターミナルエミュレータで使用するフォントは、絵文字サブセットに対応している必要があります。

絵文字をサポートするターミナルの不完全なリスト:

マウスのサポート

ターミナルエミュレータはマウススクロールイベントを通過し、weechat は スクロールイン領域 を通過します。

  • チャットエリア
  • ニックネームリストバー

tmux 内のマウス

tmux で実行する場合は、~/.tmux.conf でマウスのサポートをオンにします。

set -g mouse on

Slack IRC ゲートウェイ

Slack is a platform for team communication, a IRC on steroïd. Thanks to its open API, it is possible to connect to your slack team using weechat.

Once weechat is running, all you have to is add a new server this way:

/server add NAME HOST/6667 -autoconnect -ssl -ssl_dhkey_size=512 -password=PASSWORD -username=USERNAME -nicks=NICK

where:

  • NAME is the name you want to give to the server
  • HOST is the the Host as provided on the Gateways page of your slack team
  • PASSWORD is the Pass as provided on the Gateways page of your slack team
  • USERNAME is the User as provided on the Gateways page of your slack team
  • NICK is your Slack username.

ファイルのアップロード

To upload a file, run this following command from your shell :

curl -F file=@/path/to/file -F channels=CHAN -F token=XXX https://slack.com/api/files.upload

where:

  • CHAN is the channel ID as provided on the Gateways page of your slack team
  • XXX is the team token as provided on the Gateways page of your slack team

トラブルシューティング

プラグインのロードエラー

weechat を開始すると、メイン ウィンドウに次のような出力が表示される場合があります:

13:26:10 =!= | Error: unable to load plugin "/usr/lib/weechat/plugins/ruby.so": libruby.so.2.4: cannot open shared object file: No such file or directory
13:26:10 =!= | If you're trying to load a script and not a C plugin, try command to load scripts (/perl, /python, ...)
13:26:10 =!= | Error: unable to load plugin "/usr/lib/weechat/plugins/lua.so": liblua.so.5.3: cannot open shared object file: No such file or directory
13:26:10 =!= | If you're trying to load a script and not a C plugin, try command to load scripts (/perl, /python, ...)
13:26:10 =!= | Error: unable to load plugin "/usr/lib/weechat/plugins/aspell.so": libaspell.so.15: cannot open shared object file: No such file or directory
13:26:10 =!= | If you're trying to load a script and not a C plugin, try command to load scripts (/perl, /python, ...)
13:26:10 =!= | Error: unable to load plugin "/usr/lib/weechat/plugins/tcl.so": libtcl8.6.so: cannot open shared object file: No such file or directory
13:26:10 =!= | If you're trying to load a script and not a C plugin, try command to load scripts (/perl, /python, ...)

weechat のデフォルト設定では、/usr/lib/weechat/plugins にあるすべてのプラグインをロードしようとします。この場合、ruby、lua、aspell、tcl が含まれます。これらのパッケージは weechat パッケージには必要ないため、マシンにインストールできない場合があります。これらのエラーが気になる場合は、次の 2 つのオプションがあります。

  1. rubyluaaspell、および/または tclインストール
  2. または、/set weechat.plugin.autoload "*,!ruby,!lua,!aspell,!tcl" を実行すると、(!) プレフィックスが付いたプラグインがロードされなくなります。

multiline.pl の読み込み中に問題が発生しました

この問題は、perl バージョン 5.31.1 以上で発生します。

multiline.pl スクリプトは、Pod::Select モジュールに依存します。ただし、perl バージョン v5.31.1 以降、Pod::Select は削除されました。

この問題を解決するには、perl-pod-parser をインストールします。

ヘルプの表示

To access WeeChat's built-in help, simply type

/help

and the help will be displayed in the main buffer (usually buffer 1).

参照

ガイド