diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-05-08 20:56:49 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-05-11 21:07:30 +0200 |
commit | 70cdf21681d75090c3df9858c9e7ce5a85433856 (patch) | |
tree | c9ede7d35ede53fc73fe9b3f6ad53d8505fb3ac5 | |
parent | 87d4ea9286c641051fc36a92e6baef3c244f6e59 (diff) | |
download | weechat-70cdf21681d75090c3df9858c9e7ce5a85433856.zip |
doc: add XDG directories support in docs (issue #1285)
42 files changed, 934 insertions, 630 deletions
diff --git a/doc/cs/includes/cmdline_options.cs.adoc b/doc/cs/includes/cmdline_options.cs.adoc index 5b95ed12c..1d702cb35 100644 --- a/doc/cs/includes/cmdline_options.cs.adoc +++ b/doc/cs/includes/cmdline_options.cs.adoc @@ -16,11 +16,11 @@ (works only with the command *weechat-headless*, not compatible with option "--daemon"). +// TRANSLATION MISSING *-d*, *--dir* _<path>_:: - Nastav cestu jako dovmský adresář pro WeeChat (použitou pro konfigurační - soubory, logy, uživatelské pluginy a skripty), výchozí hodnota je - "~/.weechat" (poznámka: složka bude vytvořena pokud nebude nalezena - Weechatem) + Force a single directory for all WeeChat files (directory is created if not found). + Four directories can be given, separated by colons (in this order: config, + data, cache, runtime). Pokud tato volba není zadána, použije se promněná prostředí WEECHAT_HOME (pokud není prázdná) diff --git a/doc/cs/includes/man.cs.adoc b/doc/cs/includes/man.cs.adoc index 162e58e3a..4ead917b8 100644 --- a/doc/cs/includes/man.cs.adoc +++ b/doc/cs/includes/man.cs.adoc @@ -16,79 +16,79 @@ IPv6 adresa může být uzavřena do hranatých závorek k přidání portu, nap // end::plugin_options[] // tag::files[] -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: hlavní konfigurační soubor WeeChatu -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: soubor konfigurace pluginů -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: konfigurační soubor s chráněnými daty -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: configurační soubor pro _alias_ plugin -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: konfigurační soubor pro _buflist_ plugin -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: konfigurační soubor pro _charset_ plugin -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: konfigurační soubor pro _exec_ plugin -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: konfigurační soubor pro _fifo_ plugin -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: konfigurační soubor pro _fset_ plugin -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: konfigurační soubor pro _guile_ plugin -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: konfigurační soubor pro _irc_ plugin -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: konfigurační soubor pro _javascript_ plugin -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: konfigurační soubor pro _logger_ plugin -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: konfigurační soubor pro _lua_ plugin -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: konfigurační soubor pro _perl_ plugin -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: konfigurační soubor pro _php_ plugin -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: konfigurační soubor pro _python_ plugin -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: konfigurační soubor pro _relay_ plugin -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: konfigurační soubor pro _ruby_ plugin -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: konfigurační soubor pro _script_ plugin -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: konfigurační soubor pro _spell_ plugin -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: konfigurační soubor pro _tcl_ plugin -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: konfigurační soubor pro _trigger_ plugin -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: konfigurační soubor pro _xfer_ plugin -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: soubor záznamů WeeChatu // end::files[] diff --git a/doc/de/includes/cmdline_options.de.adoc b/doc/de/includes/cmdline_options.de.adoc index bdbb9f456..04b304241 100644 --- a/doc/de/includes/cmdline_options.de.adoc +++ b/doc/de/includes/cmdline_options.de.adoc @@ -15,10 +15,11 @@ (funktioniert ausschließlich mit *weechat-headless* und ist nicht kompatibel mit Option "--daemon"). +// TRANSLATION MISSING *-d*, *--dir* _<path>_:: - legt den Konfigurationsordner für WeeChat fest in welchem die Erweiterungen, - Skripten, Protokolldateien etc.pp. gesichert werden (Voreinstellung: "~/.weechat"). - Sollte das Verzeichnis nicht existieren wird es beim Start angelegt. + Force a single directory for all WeeChat files (directory is created if not found). + Four directories can be given, separated by colons (in this order: config, + data, cache, runtime). Wird diese Option nicht genutzt, wird die Umgebungsvariable WEECHAT_HOME genutzt (sofern diese vorhanden ist). diff --git a/doc/de/includes/man.de.adoc b/doc/de/includes/man.de.adoc index 8d87d25b2..ae2151989 100644 --- a/doc/de/includes/man.de.adoc +++ b/doc/de/includes/man.de.adoc @@ -17,79 +17,79 @@ Um eine IPv6 Adresse zu nutzen, muss diese in eckige Klammern gesetzt werden: // end::plugin_options[] // tag::files[] -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: WeeChats Konfigurationsdatei -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: Konfigurationsdatei für Erweiterungen -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: Konfigurationsdatei mit schutzwürdigen Daten -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: Konfigurationsdatei für _alias_ Erweiterung -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: Konfigurationsdatei für _buflist_ Erweiterung -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: Konfigurationsdatei für _charset_ Erweiterung -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: Konfigurationsdatei für _exec_ Erweiterung -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: Konfigurationsdatei für _fifo_ Erweiterung -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: Konfigurationsdatei für _fset_ Erweiterung -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: Konfigurationsdatei für _guile_ Erweiterung -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: Konfigurationsdatei für _irc_ Erweiterung -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: Konfigurationsdatei für _javascript_ Erweiterung -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: Konfigurationsdatei für _logger_ Erweiterung -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: Konfigurationsdatei für _lua_ Erweiterung -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: Konfigurationsdatei für _perl_ Erweiterung -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: Konfigurationsdatei für _php_ Erweiterung -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: Konfigurationsdatei für _python_ Erweiterung -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: Konfigurationsdatei für _relay_ Erweiterung -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: Konfigurationsdatei für _ruby_ Erweiterung -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: Konfigurationsdatei für _script_ Erweiterung -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: Konfigurationsdatei für _spell_ Erweiterung -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: Konfigurationsdatei für _tcl_ Erweiterung -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: Konfigurationsdatei für _trigger_ Erweiterung -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: Konfigurationsdatei für _xfer_ Erweiterung -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: WeeChat Protokolldatei // end::files[] diff --git a/doc/de/weechat_faq.de.adoc b/doc/de/weechat_faq.de.adoc index 396c02b35..c9e668b1c 100644 --- a/doc/de/weechat_faq.de.adoc +++ b/doc/de/weechat_faq.de.adoc @@ -1143,9 +1143,13 @@ Wenn das nicht hilft, sollte die Skriptliste von Hand gelöscht werden. Dazu folgenden Befehl in der Shell ausführen: ---- -$ rm ~/.weechat/script/plugins.xml.gz +$ rm ~/.cache/weechat/script/plugins.xml.gz ---- +// TRANSLATION MISSING +[NOTE] +With WeeChat ≤ 3.1, the path should be: _~/.weechat/script/plugins.xml.gz_. + Danach sollte man noch einmal versuchen die Datei herunter zu laden: ---- @@ -1165,7 +1169,7 @@ Das bedeutet aber auch, dass die Skripten von Hand aktuell gehalten werden müss * und in der Shell, mit installiertem curl: ---- -$ cd ~/.weechat/script +$ cd ~/.cache/weechat/script $ curl -O https://weechat.org/files/plugins.xml.gz ---- @@ -1287,9 +1291,9 @@ Beispiel: [[sharing_config_files]] === Ich möchte meine WeeChat Konfiguration teilen. Welche Dateien kann ich weitergeben und welche sollte ich behalten? -Es können alle _~/.weechat/*.conf_ Dateien geteilt werden. -Hiervon ausgenommen ist die Datei _sec.conf_, -die durch eine Passphrase verschlüsselte, sensible, Daten enthalten kann. +// TRANSLATION MISSING +You can share configuration files _*.conf_ except the file _sec.conf_ which +contains your passwords ciphered with your passphrase. Einige andere Dateien enthalten möglicherweise vertrauliche Informationen wie Kennwörter (sofern sie nicht mit dem Befehl `/secure` in _sec.conf_ gesichert werden). diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc index b4988eb88..161090634 100644 --- a/doc/de/weechat_scripting.de.adoc +++ b/doc/de/weechat_scripting.de.adoc @@ -349,7 +349,7 @@ anlegen, der in das Verzeichnis _Skriptsprache/autoload_ zeigt. Ein Beispiel für ein Python-Skript: ---- -$ cd ~/.weechat/python/autoload +$ cd ~/.local/share/weechat/python/autoload $ ln -s ../script.py ---- @@ -1394,10 +1394,11 @@ weechat.prnt("", "Version %s" % weechat.info_get("version", "")) [[infos_other]] ==== andere Informationen +// TRANSLATION MISSING [source,python] ---- -# WeeChat Hauptverzeichnis, zum Beispiel: "/home/xxxx/.weechat" -weechat.prnt("", "WeeChat Hauptverzeichnis: %s" % weechat.info_get("weechat_dir", "")) +# WeeChat config directory, for example: "/home/user/.config/weechat" +weechat.prnt("", "WeeChat config dir: %s" % weechat.info_get("weechat_config_dir", "")) # Inaktivität der Tastatur weechat.prnt("", "Tastatur ist seit %s Sekunden nicht mehr betätigt worden" % weechat.info_get("inactivity", "")) diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc index 580689ad5..bdeb35819 100644 --- a/doc/de/weechat_user.de.adoc +++ b/doc/de/weechat_user.de.adoc @@ -476,10 +476,10 @@ werden um die Datei zu lesen. + Weitere Informationen finden Sie auf dieser Wiki-Seite: https://wiki.archlinux.org/index.php/Core_dump Beispiel: _weechat_ ist in _/usr/bin/_ installiert und die _core_ Datei befindet sich -in _/home/xxx/_. Nun wird gdb mit folgendem Befehl aufgerufen: +in _/home/user/_. Nun wird gdb mit folgendem Befehl aufgerufen: ---- -gdb /usr/bin/weechat /home/xxx/core +gdb /usr/bin/weechat /home/user/core ---- Nun startet man _gdb_ und führt den Befehl `bt full` innerhalb der gdb Umgebung aus, um die @@ -563,9 +563,10 @@ z.B. um den Kernel zu aktualisieren oder WeeChat auf einen anderen Computer zu v /upgrade -quit ---- -Dies speichert den aktuellen Status in `*.upgrade`-Dateien. Sie können dann entweder das -gesamte `~/.weechat` Verzeichnis auf einen anderen Computer verschieben oder diesen -gespeicherten Status neu starten, mit folgendem Befehl: +// TRANSLATION MISSING +This saves the current state in `*.upgrade` files. You can then either reboot +or move the whole WeeChat directories (config, data, cache) to another machine, +and restart WeeChat later with this command: ---- $ weechat --upgrade @@ -597,7 +598,7 @@ WeeChat hat ein automatisches Upgrade für Konfigurationsdateien (`*.conf`): Beispiel für eine Warnung, wenn eine Option entfernt wurde: ---- -=!= Warnung: /home/xxx/.weechat/sec.conf, Zeile 15: unbekannte Einstellung für Sektion "crypt": passphrase_file = "" +=!= Warnung: /home/user/.config/weechat/sec.conf, Zeile 15: unbekannte Einstellung für Sektion "crypt": passphrase_file = "" ---- Das bedeutet, dass die Option "sec.crypt.passphrase_file" entfernt wurde und der @@ -617,7 +618,7 @@ $ weechat ---- Wird WeeChat das erste mal ausgeführt, wird die Standardkonfiguration und -die entsprechenden Dateien im Verzeichnis _~/.weechat_ erstellt. +die entsprechenden Dateien im Verzeichnis _~/.config/weechat_ erstellt. (siehe <<files_and_directories,Dateien und Verzeichnisse>>). ==== Optionen für Befehlszeile @@ -648,9 +649,28 @@ Einige Umgebungsvariablen werden von WeeChat genutzt, sofern sie definiert wurde [[files_and_directories]] === Dateien und Verzeichnisse -WeeChat schreibt standardmäßig seine Konfiguration und andere -Daten in folgendes Verzeichnis: `~/.weechat` + -Diese Dateien werden, mit Standardwerten, beim ersten Ausführen von WeeChat automatisch erstellt. +// TRANSLATION MISSING +[[xdg_directories]] +==== XDG directories + +WeeChat uses XDG directories by default +(according to the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG Base Directory Specification]). + +A single home directory for all files can be forced by CMake option `WEECHAT_HOME`, +the environment variable `WEECHAT_HOME` or the command-line option `-d` / `--dir`. + +When a single WeeChat home directory is not forced, XDG directories are used +and set like this: + +[width="100%",cols="1,2m,5",options="header"] +|=== +| Directory | Default value | Fallback value +| config | $XDG_CONFIG_HOME/weechat | `$HOME/.config/weechat` if `$XDG_CONFIG_HOME` is not defined or empty. +| data | $XDG_DATA_HOME/weechat | `$HOME/.local/share/weechat` if `$XDG_DATA_HOME` is not defined or empty. +| cache | $XDG_CACHE_HOME/weechat | `$HOME/.cache/weechat` if `$XDG_CACHE_HOME` is not defined or empty. +| runtime | $XDG_RUNTIME_DIR/weechat | Same as _cache_ directory if `$XDG_RUNTIME_DIR` is not defined or empty. +|=== + +The configuration files are created with default values the first time you run WeeChat. [[weechat_directories]] ==== WeeChat Verzeichnisse @@ -659,29 +679,38 @@ Es gibt folgende WeeChat Verzeichnisse: [width="100%",cols="1m,3",options="header"] |=== -| Pfad/Datei | Beschreibung -| ~/.weechat/ | WeeChat Heimatverzeichnis (kann angepasst werden, siehe <<running_weechat,Running WeeChat>>). -| logs/ | Logdateien (eine Datei pro Buffer). -| python/ | Python-Skripten. -| autoload/ | Python-Skripten die beim Start automatisch ausgeführt werden ^(1)^. -| perl/ | Perl-Skripten. -| autoload/ | Perl-Skripten die beim Start automatisch ausgeführt werden ^(1)^. -| ruby/ | Ruby-Skripten. -| autoload/ | Ruby-Skripten die beim Start automatisch ausgeführt werden ^(1)^. -| lua/ | Lua-Skripten. -| autoload/ | Lua-Skripten die beim Start automatisch ausgeführt werden ^(1)^. -| tcl/ | Tcl-Skripten. -| autoload/ | Tcl-Skripten die beim Start automatisch ausgeführt werden ^(1)^. -| guile/ | Guile-Skripten. -| autoload/ | Guile-Skripten die beim Start automatisch ausgeführt werden ^(1)^. -| javascript/ | JavaScript-Skripten. -| autoload/ | JavaScript-Skripten die beim Start automatisch ausgeführt werden ^(1)^. -| php/ | PHP-Skripten. -| autoload/ | PHP-Skripten die beim Start automatisch ausgeführt werden ^(1)^. +| Pfad ^(1)^ | Beschreibung +// TRANSLATION MISSING +| ~/.config/weechat/ | WeeChat configuration files: `*.conf`, certificates, etc. +// TRANSLATION MISSING +| ~/.local/share/weechat/ | WeeChat data files: logs, scripts, scripts data, xfer files, etc. +| logs/ | Logdateien (eine Datei pro Buffer). +| python/ | Python-Skripten. +| autoload/ | Python-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +| perl/ | Perl-Skripten. +| autoload/ | Perl-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +| ruby/ | Ruby-Skripten. +| autoload/ | Ruby-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +| lua/ | Lua-Skripten. +| autoload/ | Lua-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +| tcl/ | Tcl-Skripten. +| autoload/ | Tcl-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +| guile/ | Guile-Skripten. +| autoload/ | Guile-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +| javascript/ | JavaScript-Skripten. +| autoload/ | JavaScript-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +| php/ | PHP-Skripten. +| autoload/ | PHP-Skripten die beim Start automatisch ausgeführt werden ^(2)^. +// TRANSLATION MISSING +| ~/.cache/weechat/ | WeeChat cache files: scripts cache. +// TRANSLATION MISSING +| /run/user/1000/weechat/ | WeeChat runtime files: FIFO pipe, Relay UNIX sockets. |=== +// TRANSLATION MISSING [NOTE] -^(1)^ Das Verzeichnis besteht meistens aus symbolischen Links welche auf das eigentliche Skript zeigen. +^(1)^ XDG directories may be different according to your environment variables `XDG_*`. + +^(2)^ Das Verzeichnis besteht meistens aus symbolischen Links welche auf das eigentliche Skript zeigen. [[weechat_files]] ==== WeeChat Dateien @@ -2765,7 +2794,9 @@ Sie können WeeChat fern steuern indem Sie Befehle oder einen Text an die FIFO P schicken (dazu muss die Option "fifo.file.enabled" aktiviert sein (standardmäßig ist diese Option aktiviert). -Die FIFO-Pipe befindet sich standardmäßig im Pfad _~/.weechat/_ und heißt _weechat_fifo_. +// TRANSLATION MISSING +The FIFO pipe is located in WeeChat runtime directory and is called +_weechat_fifo_ by default. Die Syntax der FIFO Pipe Befehle/Text sieht wie folgt aus: @@ -2779,26 +2810,26 @@ einige Beispiele: * Ändert den eigenen Nick auf dem IRC Server freenode in "newnick": ---- -$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo +$ echo 'irc.server.freenode */nick newnick' >/run/user/1000/weechat/weechat_fifo ---- * Schickt eine Nachrich in den IRC #weechat Channel: ---- -$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo +$ echo 'irc.freenode.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo ---- * Schickt eine Nachricht in den aktuellen Buffer: ---- -$ echo '*hello!' >~/.weechat/weechat_fifo +$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo ---- * Sendet zwei Befehle um alle Python-Skripten zu entfernen und dann neu zu laden (die beiden Befehle müssen mit "\n" getrennt werden): ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo +$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo ---- [[fifo_commands]] @@ -3451,7 +3482,7 @@ Datumsspezifikationen in der Maske genutzt werden (siehe Erstellt eine Struktur in folgender Form: .... -~/.weechat +~/.local/share/weechat └── logs ├── 2010 │ ├── 11 @@ -3481,7 +3512,7 @@ einer Protokolldatei für jeden Channel: Erstellt eine Struktur in folgender Form: .... -~/.weechat +~/.local/share/weechat └── logs └── irc ├── freenode @@ -3698,13 +3729,15 @@ man jedes Protokoll zum Lauschen an einem UNIX Domain Socket nutzen, indem man einen Pfad angibt. Zum Beispiel: ---- -/relay add unix.weechat %h/relay_socket +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ---- -Das erlaubt es Clients sich mittels dem weechat Protokoll mit -_~/.weechat/relay_socket_ zu verbinden. Dies ist besonders zu +Das erlaubt es Clients sich mittels dem weechat Protokoll mit +_/run/user/1000/weechat/relay_socket_ zu verbinden. Dies ist besonders zu empfehlen um SSH forwarding für relay Clients zu nutzen, falls -andere Ports nicht geöffnet werden können. OpenSSH nutzen: +andere Ports nicht geöffnet werden können. + +OpenSSH nutzen: ---- $ ssh -L 9000:.weechat/relay_socket user@hostname diff --git a/doc/en/includes/cmdline_options.en.adoc b/doc/en/includes/cmdline_options.en.adoc index 26f815ad1..da7abb209 100644 --- a/doc/en/includes/cmdline_options.en.adoc +++ b/doc/en/includes/cmdline_options.en.adoc @@ -15,9 +15,9 @@ "--daemon"). *-d*, *--dir* _<path>_:: - Set path as home for WeeChat (used for configuration files, logs, user - plugins and scripts), default value is "~/.weechat" (note: directory is - created if not found by WeeChat). + Force a single directory for all WeeChat files (directory is created if not found). + Four directories can be given, separated by colons (in this order: config, + data, cache, runtime). If this option is not given, the environment variable WEECHAT_HOME is used (if not empty). diff --git a/doc/en/includes/man.en.adoc b/doc/en/includes/man.en.adoc index 1ff50e017..812bfd5c2 100644 --- a/doc/en/includes/man.en.adoc +++ b/doc/en/includes/man.en.adoc @@ -17,79 +17,79 @@ example: // end::plugin_options[] // tag::files[] -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: main WeeChat configuration file -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: plugins configuration file -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: configuration file with secured data -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: configuration file for _alias_ plugin -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: configuration file for _buflist_ plugin -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: configuration file for _charset_ plugin -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: configuration file for _exec_ plugin -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: configuration file for _fifo_ plugin -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: configuration file for _fset_ plugin -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: configuration file for _guile_ plugin -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: configuration file for _irc_ plugin -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: configuration file for _javascript_ plugin -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: configuration file for _logger_ plugin -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: configuration file for _lua_ plugin -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: configuration file for _perl_ plugin -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: configuration file for _php_ plugin -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: configuration file for _python_ plugin -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: configuration file for _relay_ plugin -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: configuration file for _ruby_ plugin -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: configuration file for _script_ plugin -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: configuration file for _spell_ plugin -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: configuration file for _tcl_ plugin -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: configuration file for _trigger_ plugin -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: configuration file for _xfer_ plugin -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: WeeChat log file // end::files[] diff --git a/doc/en/weechat_faq.en.adoc b/doc/en/weechat_faq.en.adoc index 4fc180d6e..b9a376118 100644 --- a/doc/en/weechat_faq.en.adoc +++ b/doc/en/weechat_faq.en.adoc @@ -1053,9 +1053,12 @@ First check questions about SSL connection in this FAQ If still not working, try to manually delete the scripts file (in your shell): ---- -$ rm ~/.weechat/script/plugins.xml.gz +$ rm ~/.cache/weechat/script/plugins.xml.gz ---- +[NOTE] +With WeeChat ≤ 3.1, the path should be: _~/.weechat/script/plugins.xml.gz_. + And update scripts again in WeeChat: ---- @@ -1075,7 +1078,7 @@ have to update manually the file yourself to get updates): * in your shell, with curl installed: ---- -$ cd ~/.weechat/script +$ cd ~/.cache/weechat/script $ curl -O https://weechat.org/files/plugins.xml.gz ---- @@ -1191,7 +1194,7 @@ For example: [[sharing_config_files]] === I want to share my WeeChat configuration, what files should I share and what should I keep private? -You can share files _~/.weechat/*.conf_ except the file _sec.conf_ which +You can share configuration files _*.conf_ except the file _sec.conf_ which contains your passwords ciphered with your passphrase. Some other files may contain sensitive info like passwords (if they are not diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index cc6ee1844..087ab73d4 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -179,7 +179,7 @@ $ gcc -shared -fPIC -o toto.so toto.o Copy file _toto.so_ into system plugins directory (for example _/usr/local/lib/weechat/plugins_) or into user's plugins directory (for example -_/home/xxx/.weechat/plugins_). +_/home/user/.local/share/weechat/plugins_). Under WeeChat: @@ -1026,7 +1026,7 @@ C example: [source,C] ---- char *str = weechat_string_expand_home ("~/file.txt"); -/* result: "/home/xxx/file.txt" */ +/* result: "/home/user/file.txt" */ /* ... */ free (str); ---- @@ -1036,11 +1036,11 @@ This function is not available in scripting API. ==== string_eval_path_home -_WeeChat ≥ 1.3._ +_WeeChat ≥ 1.3, updated in 3.2._ Evaluate a path in 3 steps: -. replace leading `%h` by WeeChat home directory, +. replace leading `%h` by a WeeChat directory (data by default), . replace leading `+~+` by user home directory (call to <<_string_expand_home,string_expand_home>>), . evaluate variables (see <<_string_eval_expression,string_eval_expression>>). @@ -1063,7 +1063,13 @@ Arguments: * _extra_vars_: hashtable for call to function <<_string_eval_expression,string_eval_expression>> * _options_: hashtable for call to function - <<_string_eval_expression,string_eval_expression>> + <<_string_eval_expression,string_eval_expression>>, with one extra key + supported: +** _directory_: WeeChat directory to use when replacing `%h`, one of: +*** _config_ +*** _data_ (default) +*** _cache_ +*** _runtime_ Return value: @@ -1073,8 +1079,8 @@ C example: [source,C] ---- -char *str = weechat_string_eval_path_home ("%h/test", NULL, NULL, NULL); -/* result: "/home/xxx/.weechat/test" */ +char *str = weechat_string_eval_path_home ("${weechat_config_dir}/test.conf", NULL, NULL, NULL); +/* result: "/home/user/.config/weechat/test.conf" */ /* ... */ free (str); ---- @@ -1087,8 +1093,8 @@ Script (Python): path = weechat.string_eval_path_home(path, pointers, extra_vars, options) # example -path = weechat.string_eval_path_home("%h/test", {}, {}, {}) -# path == "/home/xxx/.weechat/test" +path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {}) +# path == "/home/user/.config/weechat/test.conf" ---- ==== string_remove_quotes @@ -2535,6 +2541,18 @@ expanded to last): `+${name}+` | `+value+` +| `+${weechat_xxx_dir}+` | + A WeeChat directory: `+${weechat_config_dir}+`, `+${weechat_data_dir}+`, + `+${weechat_cache_dir}+` or `+${weechat_runtime_dir}+`. | + `+${weechat_config_dir}+` + + `+${weechat_data_dir}+` + + `+${weechat_cache_dir}+` + + `+${weechat_runtime_dir}+` | + `+/home/user/.config/weechat+` + + `+/home/user/.local/share/weechat+` + + `+/home/user/.cache/weechat+` + + `+/run/user/1000/weechat+` + | `+${eval:xxx}+` + _(WeeChat ≥ 1.3)_ | String to evaluate. | @@ -2656,9 +2674,9 @@ expanded to last): Result of a modifier, see function <<_hook_modifier_exec,hook_modifier_exec>>. | `+${modifier:eval_path_home,,~}+` + - `+${modifier:eval_path_home,,%h/python}+` | - `+/home/xxx+` + - `+/home/xxx/.weechat/python+` + `+${modifier:eval_path_home,directory=config,%h/weechat.conf}+` | + `+/home/user+` + + `+/home/user/.config/weechat/weechat.conf+` | `+${info:name}+` + `+${info:name,arguments}+` + @@ -3609,6 +3627,8 @@ Some functions related to directories. ==== mkdir_home +_Updated in 3.2._ + Create a directory in WeeChat home. Prototype: @@ -3620,7 +3640,12 @@ int weechat_mkdir_home (char *directory, int mode); Arguments: -* _directory_: name of directory to create +* _directory_: name of directory to create; it can start with one of these + strings to force a specific WeeChat directory (WeeChat ≥ 3.2): +** `${weechat_config_dir}` +** `${weechat_data_dir}` (default) +** `${weechat_cache_dir}` +** `${weechat_runtime_dir}` * _mode_: mode for directory Return value: @@ -3631,7 +3656,7 @@ C example: [source,C] ---- -if (!weechat_mkdir_home ("temp", 0755)) +if (!weechat_mkdir_home ("${weechat_cache_dir}/temp", 0755)) { /* error */ } @@ -3645,7 +3670,7 @@ Script (Python): weechat.mkdir_home(directory, mode) # example -weechat.mkdir_home("temp", 0755) +weechat.mkdir_home("${weechat_cache_dir}/temp", 0755) ---- ==== mkdir @@ -10954,8 +10979,8 @@ Five signals can be sent to install a script, according to language: The callback will do following actions when receiving signal: . Unload and remove installed script. -. Move new script to directory _~/.weechat/xxx/_ (where _xxx_ is language). -. Create link to new script in directory _~/.weechat/xxx/autoload/_ +. Move new script to directory _~/.local/share/weechat/xxx/_ (where _xxx_ is language). +. Create link to new script in directory _~/.local/share/weechat/xxx/autoload/_ (only if the script was already auto-loaded, or if the option _script.scripts.autoload_ is enabled for a new script). . Load new script (if the script was loaded). @@ -10968,16 +10993,14 @@ C example: [source,C] ---- -weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py"); +weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py"); ---- Script (Python): [source,python] ---- -weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py") +weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py") ---- [[signals_xxx_script_remove]] @@ -11761,7 +11784,7 @@ List of modifiers defined by WeeChat and plugins that can be used: | [[hook_modifier_eval_path_home]] eval_path_home + _(WeeChat ≥ 2.7)_ | - - | + Optional: `directory=xxx` where `xxx` can be: `config`, `data`, `cache`, `runtime` | Any string. | Evaluated path, result of the function <<_string_eval_path_home,string_eval_path_home>>. @@ -15412,10 +15435,10 @@ if (version) if (date) free (date); -char *weechat_dir = weechat_info_get ("weechat_dir", NULL); -weechat_printf (NULL, "WeeChat home is: %s", weechat_dir); -if (weechat_dir) - free (weechat_dir); +char *weechat_config_dir = weechat_info_get ("weechat_config_dir", NULL); +weechat_printf (NULL, "WeeChat config directory is: %s", weechat_config_dir); +if (weechat_config_dir) + free (weechat_config_dir); ---- Script (Python): @@ -15428,7 +15451,7 @@ value = weechat.info_get(info_name, arguments) # example weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)" % (weechat.info_get("version", ""), weechat.info_get("date", "")) -weechat.prnt("", "WeeChat home is: %s" % weechat.info_get("weechat_dir", "")) +weechat.prnt("", "WeeChat config directory is: %s" % weechat.info_get("weechat_config_dir", "")) ---- ==== info_get_hashtable diff --git a/doc/en/weechat_relay_protocol.en.adoc b/doc/en/weechat_relay_protocol.en.adoc index 15c512b58..e5256aa46 100644 --- a/doc/en/weechat_relay_protocol.en.adoc +++ b/doc/en/weechat_relay_protocol.en.adoc @@ -588,15 +588,15 @@ inf: ('version_number', '34144256') * Request WeeChat directory: ---- -(info_weechat_dir) info weechat_dir +(info_weechat_config_dir) info weechat_config_dir ---- Response: [source,python] ---- -id: 'info_weechat_dir' -inf: ('weechat_dir', '/home/xxx/.weechat') +id: 'info_weechat_config_dir' +inf: ('weechat_config_dir', '/home/user/.config/weechat') ---- [[command_infolist]] diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc index e045fd247..0923430a7 100644 --- a/doc/en/weechat_scripting.en.adoc +++ b/doc/en/weechat_scripting.en.adoc @@ -337,7 +337,7 @@ WeeChat is starting. For example with Python: ---- -$ cd ~/.weechat/python/autoload +$ cd ~/.local/share/weechat/python/autoload $ ln -s ../script.py ---- @@ -1368,8 +1368,8 @@ weechat.prnt("", "Version %s" % weechat.info_get("version", "")) [source,python] ---- -# WeeChat home directory, for example: "/home/xxxx/.weechat" -weechat.prnt("", "WeeChat home dir: %s" % weechat.info_get("weechat_dir", "")) +# WeeChat config directory, for example: "/home/user/.config/weechat" +weechat.prnt("", "WeeChat config dir: %s" % weechat.info_get("weechat_config_dir", "")) # keyboard inactivity weechat.prnt("", "Inactivity since %s seconds" % weechat.info_get("inactivity", "")) diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index 6af0c0fe3..93ac63599 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -465,10 +465,10 @@ _/var/lib/systemd/coredump_ and you must use the command `coredumpctl` to read i For more information, see this wiki page: https://wiki.archlinux.org/index.php/Core_dump For example if _weechat_ is installed in _/usr/bin/_ and _core_ file is -in _/home/xxx/_, then run gdb with this command: +in _/home/user/_, then run gdb with this command: ---- -gdb /usr/bin/weechat /home/xxx/core +gdb /usr/bin/weechat /home/user/core ---- Then under gdb, use command `bt full` to display backtrace. @@ -553,8 +553,8 @@ to upgrade the kernel or to move your WeeChat to another machine: ---- This saves the current state in `*.upgrade` files. You can then either reboot -or move the whole directory `~/.weechat` to another machine, and restart -WeeChat later with this command: +or move the whole WeeChat directories (config, data, cache) to another machine, +and restart WeeChat later with this command: ---- $ weechat --upgrade @@ -586,7 +586,7 @@ WeeChat has an automatic upgrade of configuration files (`*.conf`): Example of warning when an option has been removed: ---- -=!= Warning: /home/xxx/.weechat/sec.conf, line 15: unknown option for section "crypt": passphrase_file = "" +=!= Warning: /home/user/.config/weechat/sec.conf, line 15: unknown option for section "crypt": passphrase_file = "" ---- That means the option `sec.crypt.passphrase_file` has been removed, and you @@ -606,7 +606,7 @@ $ weechat ---- When you run WeeChat for the first time, the default configuration files are -created in _~/.weechat_ with default options and values +created in _~/.config/weechat_ with default options and values (see <<files_and_directories,Files and directories>>). ==== Command line options @@ -636,9 +636,27 @@ Some environment variables are used by WeeChat if they are defined: [[files_and_directories]] === Files and directories -WeeChat writes configuration files and other data in directory `~/.weechat` -by default. + -These files are created with default values the first time you run WeeChat. +[[xdg_directories]] +==== XDG directories + +WeeChat uses XDG directories by default +(according to the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG Base Directory Specification]). + +A single home directory for all files can be forced by CMake option `WEECHAT_HOME`, +the environment variable `WEECHAT_HOME` or the command-line option `-d` / `--dir`. + +When a single WeeChat home directory is not forced, XDG directories are used +and set like this: + +[width="100%",cols="1,2m,5",options="header"] +|=== +| Directory | Default value | Fallback value +| config | $XDG_CONFIG_HOME/weechat | `$HOME/.config/weechat` if `$XDG_CONFIG_HOME` is not defined or empty. +| data | $XDG_DATA_HOME/weechat | `$HOME/.local/share/weechat` if `$XDG_DATA_HOME` is not defined or empty. +| cache | $XDG_CACHE_HOME/weechat | `$HOME/.cache/weechat` if `$XDG_CACHE_HOME` is not defined or empty. +| runtime | $XDG_RUNTIME_DIR/weechat | Same as _cache_ directory if `$XDG_RUNTIME_DIR` is not defined or empty. +|=== + +The configuration files are created with default values the first time you run WeeChat. [[weechat_directories]] ==== WeeChat directories @@ -647,29 +665,33 @@ The WeeChat directories are: [width="100%",cols="1m,3",options="header"] |=== -| Path/file | Description -| ~/.weechat/ | WeeChat home directory (can be changed, see <<running_weechat,Running WeeChat>>). -| logs/ | Log files (one file per buffer). -| python/ | Python scripts. -| autoload/ | Python scripts auto-loaded on startup ^(1)^. -| perl/ | Perl scripts. -| autoload/ | Perl scripts auto-loaded on startup ^(1)^. -| ruby/ | Ruby scripts. -| autoload/ | Ruby scripts auto-loaded on startup ^(1)^. -| lua/ | Lua scripts. -| autoload/ | Lua scripts auto-loaded on startup ^(1)^. -| tcl/ | Tcl scripts. -| autoload/ | Tcl scripts auto-loaded on startup ^(1)^. -| guile/ | Guile scripts. -| autoload/ | Guile scripts auto-loaded on startup ^(1)^. -| javascript/ | JavaScript scripts. -| autoload/ | JavaScript scripts auto-loaded on startup ^(1)^. -| php/ | PHP scripts. -| autoload/ | PHP scripts auto-loaded on startup ^(1)^. +| Path ^(1)^ | Description +| ~/.config/weechat/ | WeeChat configuration files: `*.conf`, certificates, etc. +| ~/.local/share/weechat/ | WeeChat data files: logs, scripts, scripts data, xfer files, etc. +| logs/ | Log files (one file per buffer). +| python/ | Python scripts. +| autoload/ | Python scripts auto-loaded on startup ^(2)^. +| perl/ | Perl scripts. +| autoload/ | Perl scripts auto-loaded on startup ^(2)^. +| ruby/ | Ruby scripts. +| autoload/ | Ruby scripts auto-loaded on startup ^(2)^. +| lua/ | Lua scripts. +| autoload/ | Lua scripts auto-loaded on startup ^(2)^. +| tcl/ | Tcl scripts. +| autoload/ | Tcl scripts auto-loaded on startup ^(2)^. +| guile/ | Guile scripts. +| autoload/ | Guile scripts auto-loaded on startup ^(2)^. +| javascript/ | JavaScript scripts. +| autoload/ | JavaScript scripts auto-loaded on startup ^(2)^. +| php/ | PHP scripts. +| autoload/ | PHP scripts auto-loaded on startup ^(2)^. +| ~/.cache/weechat/ | WeeChat cache files: scripts cache. +| /run/user/1000/weechat/ | WeeChat runtime files: FIFO pipe, Relay UNIX sockets. |=== [NOTE] -^(1)^ This directory often contains only symbolic links to scripts in the parent directory. +^(1)^ XDG directories may be different according to your environment variables `XDG_*`. + +^(2)^ This directory often contains only symbolic links to scripts in the parent directory. [[weechat_files]] ==== WeeChat files @@ -2713,7 +2735,8 @@ include::includes/autogen_user_options.en.adoc[tag=exec_options] You can remote control WeeChat, by sending commands or text to a FIFO pipe (if option "fifo.file.enabled" is enabled, it is by default). -The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default. +The FIFO pipe is located in WeeChat runtime directory and is called +_weechat_fifo_ by default. Syntax for the FIFO pipe commands/text is one of following: @@ -2727,26 +2750,26 @@ Some examples: * Change nick on IRC server freenode to "newnick": ---- -$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo +$ echo 'irc.server.freenode */nick newnick' >/run/user/1000/weechat/weechat_fifo ---- * Send a message on IRC #weechat channel: ---- -$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo +$ echo 'irc.freenode.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo ---- * Send a message on current buffer: ---- -$ echo '*hello!' >~/.weechat/weechat_fifo +$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo ---- * Send two commands to unload/reload Python scripts (you have to separate them with "\n"): ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo +$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo ---- [[fifo_commands]] @@ -3381,7 +3404,7 @@ To have log files by date, you can use date/time specifiers in mask (see You'll have following files: .... -~/.weechat +~/.local/share/weechat └── logs ├── 2010 │ ├── 11 @@ -3410,7 +3433,7 @@ If you want one directory by IRC server and one file by channel inside: You'll have following files: .... -~/.weechat +~/.local/share/weechat └── logs └── irc ├── freenode @@ -3615,12 +3638,14 @@ Using the protocol option "unix" with the `/relay add` command, you can listen using any protocol on a UNIX domain socket at a given path. For example: ---- -/relay add unix.weechat %h/relay_socket +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ---- This allows clients to connect using the weechat protocol to -_~/.weechat/relay_socket_. This is particularly useful to allow SSH forwarding -for relay clients, when other ports cannot be opened. Using OpenSSH: +_/run/user/1000/weechat/relay_socket_. This is particularly useful to allow +SSH forwarding for relay clients, when other ports cannot be opened. + +Using OpenSSH: ---- $ ssh -L 9000:.weechat/relay_socket user@hostname diff --git a/doc/fr/includes/cmdline_options.fr.adoc b/doc/fr/includes/cmdline_options.fr.adoc index 5cdb3b9a0..8eef36a20 100644 --- a/doc/fr/includes/cmdline_options.fr.adoc +++ b/doc/fr/includes/cmdline_options.fr.adoc @@ -15,10 +15,10 @@ *weechat-headless*, non compatible avec l'option "--daemon"). *-d*, *--dir* _<répertoire>_:: - Définir le répertoire comme étant la base de WeeChat - (utilisé pour les fichiers de configuration, logs, extensions - et scripts de l'utilisateur), la valeur par défaut est "~/.weechat" - (note : le répertoire est créé s'il n'est pas trouvé par WeeChat). + Forcer un unique répertoire pour tous les fichiers WeeChat (le répertoire + est créé s'il n'est pas trouvé). + Quatre répertoires peuvent être donnés, séparés par ":" (dans cet ordre : + config, data, cache, runtime). Si cette option n'est pas donnée, la variable d'environnement WEECHAT_HOME est utilisée (si non vide). diff --git a/doc/fr/includes/man.fr.adoc b/doc/fr/includes/man.fr.adoc index d35d07542..387de3712 100644 --- a/doc/fr/includes/man.fr.adoc +++ b/doc/fr/includes/man.fr.adoc @@ -19,79 +19,79 @@ après, par exemple : // end::plugin_options[] // tag::files[] -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: fichier de configuration principal de WeeChat -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: fichier de configuration des extensions -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: fichier de configuration avec les données sécurisées -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: fichier de configuration pour l'extension _alias_ -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: fichier de configuration pour l'extension _buflist_ -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: fichier de configuration pour l'extension _charset_ -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: fichier de configuration pour l'extension _exec_ -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: fichier de configuration pour l'extension _fifo_ -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: fichier de configuration pour l'extension _fset_ -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: fichier de configuration pour l'extension _guile_ -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: fichier de configuration pour l'extension _irc_ -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: fichier de configuration pour l'extension _javascript_ -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: fichier de configuration pour l'extension _logger_ -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: fichier de configuration pour l'extension _lua_ -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: fichier de configuration pour l'extension _perl_ -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: fichier de configuration pour l'extension _php_ -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: fichier de configuration pour l'extension _python_ -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: fichier de configuration pour l'extension _relay_ -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: fichier de configuration pour l'extension _ruby_ -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: fichier de configuration pour l'extension _script_ -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: fichier de configuration pour l'extension _spell_ -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: fichier de configuration pour l'extension _tcl_ -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: fichier de configuration pour l'extension _trigger_ -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: fichier de configuration pour l'extension _xfer_ -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: fichier de log de WeeChat // end::files[] diff --git a/doc/fr/weechat_faq.fr.adoc b/doc/fr/weechat_faq.fr.adoc index 88e7df0bd..09ac6cc93 100644 --- a/doc/fr/weechat_faq.fr.adoc +++ b/doc/fr/weechat_faq.fr.adoc @@ -1093,9 +1093,12 @@ Si cela ne fonctionne toujours pas, essayez de supprimer manuellement le fichier avec les scripts (dans votre shell) : ---- -$ rm ~/.weechat/script/plugins.xml.gz +$ rm ~/.cache/weechat/script/plugins.xml.gz ---- +[NOTE] +Avec WeeChat ≤ 3.1, le chemin devrait être : _~/.weechat/script/plugins.xml.gz_. + Et mettez à jour les scripts à nouveau dans WeeChat : ---- @@ -1116,7 +1119,7 @@ vous-même pour obtenir les mises à jour) : * dans votre shell, avec curl installé : ---- -$ cd ~/.weechat/script +$ cd ~/.cache/weechat/script $ curl -O https://weechat.org/files/plugins.xml.gz ---- @@ -1239,7 +1242,7 @@ Par exemple : [[sharing_config_files]] === Je souhaite partager ma configuration de WeeChat, quels fichiers dois-je partager et que dois-je garder privé ? -Vous pouvez partager les fichiers _~/.weechat/*.conf_ sauf le fichier +Vous pouvez partager les fichiers de configuration _*.conf_ sauf le fichier _sec.conf_ qui contient vos mots de passes chiffrés avec votre phrase de chiffrement. diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index a95f4c1e5..fae0d76dd 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -184,7 +184,7 @@ $ gcc -shared -fPIC -o toto.so toto.o Copiez le fichier _toto.so_ dans le répertoire système des extensions (par exemple _/usr/local/lib/weechat/plugins_) ou dans le répertoire utilisateur des -extensions (par exemple _/home/xxx/.weechat/plugins_). +extensions (par exemple _/home/user/.local/share/weechat/plugins_). Sous WeeChat : @@ -1040,7 +1040,7 @@ Exemple en C : [source,C] ---- char *str = weechat_string_expand_home ("~/fichier.txt"); -/* résultat : "/home/xxx/fichier.txt" */ +/* résultat : "/home/user/fichier.txt" */ /* ... */ free (str); ---- @@ -1050,11 +1050,11 @@ Cette fonction n'est pas disponible dans l'API script. ==== string_eval_path_home -_WeeChat ≥ 1.3._ +_WeeChat ≥ 1.3, mis à jour dans la 3.2._ Évaluer un chemin en 3 étapes : -. remplacer le `%h` du début par le répertoire maison de WeeChat, +. remplacer le `%h` du début par un répertoire WeeChat ("data" par défaut), . remplacer le `+~+` du début par le répertoire maison de l'utilisateur (appel à <<_string_expand_home,string_expand_home>>), . évaluer les variables (voir <<_string_eval_expression,string_eval_expression>>). @@ -1077,7 +1077,14 @@ Paramètres : * _extra_vars_ : table de hachage pour l'appel à la fonction <<_string_eval_expression,string_eval_expression>> * _options_ : table de hachage pour l'appel à la fonction - <<_string_eval_expression,string_eval_expression>> + <<_string_eval_expression,string_eval_expression>>, avec une clé supplémentaire + supportée : +** _directory_: répertoire WeeChat à utiliser pour remplacer `%h`, un parmi + ceux-ci : +*** _config_ +*** _data_ (par défaut) +*** _cache_ +*** _runtime_ Valeur de retour : @@ -1087,8 +1094,8 @@ Exemple en C : [source,C] ---- -char *str = weechat_string_eval_path_home ("%h/test", NULL, NULL, NULL); -/* résultat : "/home/xxx/.weechat/test" */ +char *str = weechat_string_eval_path_home ("${weechat_config_dir}/test.conf", NULL, NULL, NULL); +/* résultat : "/home/user/.config/weechat/test.conf" */ /* ... */ free (str); ---- @@ -1101,8 +1108,8 @@ Script (Python) : path = weechat.string_eval_path_home(path, pointers, extra_vars, options) # exemple -path = weechat.string_eval_path_home("%h/test", {}, {}, {}) -# path == "/home/xxx/.weechat/test" +path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {}) +# path == "/home/user/.config/weechat/test.conf" ---- ==== string_remove_quotes @@ -2578,6 +2585,18 @@ première étendue à la dernière) : `+${nom}+` | `+valeur+` +| `+${weechat_xxx_dir}+` | + Un répertoire WeeChat : `+${weechat_config_dir}+`, `+${weechat_data_dir}+`, + `+${weechat_cache_dir}+` ou `+${weechat_runtime_dir}+`. | + `+${weechat_config_dir}+` + + `+${weechat_data_dir}+` + + `+${weechat_cache_dir}+` + + `+${weechat_runtime_dir}+` | + `+/home/user/.config/weechat+` + + `+/home/user/.local/share/weechat+` + + `+/home/user/.cache/weechat+` + + `+/run/user/1000/weechat+` + | `+${eval:xxx}+` + _(WeeChat ≥ 1.3)_ | Chaîne à évaluer. | @@ -2701,9 +2720,9 @@ première étendue à la dernière) : Résultat d'un modificateur, voir la fonction <<_hook_modifier_exec,hook_modifier_exec>>. | `+${modifier:eval_path_home,,~}+` + - `+${modifier:eval_path_home,,%h/python}+` | - `+/home/xxx+` + - `+/home/xxx/.weechat/python+` + `+${modifier:eval_path_home,directory=config,%h/weechat.conf}+` | + `+/home/user+` + + `+/home/user/.config/weechat/weechat.conf+` | `+${info:nom}+` + `+${info:nom,paramètres}+` + @@ -3668,6 +3687,8 @@ Fonctions liées aux répertoires. ==== mkdir_home +_Mis à jour dans la 3.2._ + Créer un répertoire dans le répertoire de WeeChat. Prototype : @@ -3679,7 +3700,12 @@ int weechat_mkdir_home (char *directory, int mode); Paramètres : -* _directory_ : nom du répertoire à créer +* _directory_ : nom du répertoire à créer ; il peut commencer par une de ces + chaînes pour forcer un répertoire spécifique de WeeChat (WeeChat ≥ 3.2) : +** `${weechat_config_dir}` +** `${weechat_data_dir}` (par défaut) +** `${weechat_cache_dir}` +** `${weechat_runtime_dir}` * _mode_ : mode pour le répertoire Valeur de retour : @@ -3690,7 +3716,7 @@ Exemple en C : [source,C] ---- -if (!weechat_mkdir_home ("temp", 0755)) +if (!weechat_mkdir_home ("${weechat_cache_dir}/temp", 0755)) { /* erreur */ } @@ -3704,7 +3730,7 @@ Script (Python) : weechat.mkdir_home(directory, mode) # exemple -weechat.mkdir_home("temp", 0755) +weechat.mkdir_home("${weechat_cache_dir}/temp", 0755) ---- ==== mkdir @@ -11163,12 +11189,12 @@ La fonction de rappel effectuera les actions suivantes lorsqu'elle recevra le signal : . Déchargement et suppression du script installé. -. Déplacement du nouveau script vers le répertoire _~/.weechat/xxx/_ (où _xxx_ - est le langage). +. Déplacement du nouveau script vers le répertoire _~/.local/share/weechat/xxx/_ + (où _xxx_ est le langage). . Création d'un lien vers le nouveau script dans le répertoire - _~/.weechat/xxx/autoload/_ (seulement si le script était déjà automatiquement - chargé ou si l'option _script.scripts.autoload_ est activée pour un nouveau - script). + _~/.local/share/weechat/xxx/autoload/_ (seulement si le script était déjà + automatiquement chargé ou si l'option _script.scripts.autoload_ est activée + pour un nouveau script). . Chargement du nouveau script (si le script était chargé). Ces signaux sont utilisés par l'extension _script_ pour installer des scripts. @@ -11179,16 +11205,14 @@ Exemple en C : [source,C] ---- -weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py"); +weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py"); ---- Script (Python) : [source,python] ---- -weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py") +weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py") ---- [[signals_xxx_script_remove]] @@ -12004,7 +12028,7 @@ utilisés : | [[hook_modifier_eval_path_home]] eval_path_home + _(WeeChat ≥ 2.7)_ | - - | + Facultatif : `directory=xxx` où `xxx` peut être : `config`, `data`, `cache`, `runtime` | Toute chaîne. | Chemin évalué, résultat de la fonction <<_string_eval_path_home,string_eval_path_home>>. @@ -15729,10 +15753,10 @@ if (version) if (date) free (date); -weechat_dir = weechat_info_get ("weechat_dir", NULL); -weechat_printf (NULL, "Le répertoire de WeeChat est : %s", weechat_dir); -if (weechat_dir) - free (weechat_dir); +weechat_config_dir = weechat_info_get ("weechat_config_dir", NULL); +weechat_printf (NULL, "Le répertoire de config WeeChat est : %s", weechat_config_dir); +if (weechat_config_dir) + free (weechat_config_dir); ---- Script (Python) : @@ -15745,7 +15769,7 @@ value = weechat.info_get(info_name, arguments) # exemple weechat.prnt("", "La version de WeeChat est : %s (compilée le %s)" % (weechat.info_get("version", ""), weechat.info_get("date", "")) -weechat.prnt("", "Le répertoire de WeeChat est : %s" % weechat.info_get("weechat_dir", "")) +weechat.prnt("", "Le répertoire de config WeeChat est : %s" % weechat.info_get("weechat_config_dir", "")) ---- ==== info_get_hashtable diff --git a/doc/fr/weechat_relay_protocol.fr.adoc b/doc/fr/weechat_relay_protocol.fr.adoc index 64d139d67..da941f027 100644 --- a/doc/fr/weechat_relay_protocol.fr.adoc +++ b/doc/fr/weechat_relay_protocol.fr.adoc @@ -599,15 +599,15 @@ inf: ('version_number', '34144256') * Demander le répertoire de WeeChat : ---- -(info_weechat_dir) info weechat_dir +(info_weechat_config_dir) info weechat_config_dir ---- Réponse : [source,python] ---- -id: 'info_weechat_dir' -inf: ('weechat_dir', '/home/xxx/.weechat') +id: 'info_weechat_config_dir' +inf: ('weechat_config_dir', '/home/user/.config/weechat') ---- [[command_infolist]] diff --git a/doc/fr/weechat_scripting.fr.adoc b/doc/fr/weechat_scripting.fr.adoc index 85cc29dcc..6b887fb0c 100644 --- a/doc/fr/weechat_scripting.fr.adoc +++ b/doc/fr/weechat_scripting.fr.adoc @@ -349,7 +349,7 @@ automatiquement le script quand WeeChat démarre. Par exemple en Python : ---- -$ cd ~/.weechat/python/autoload +$ cd ~/.local/share/weechat/python/autoload $ ln -s ../script.py ---- @@ -1408,8 +1408,8 @@ weechat.prnt("", "Version %s" % weechat.info_get("version", "")) [source,python] ---- -# répertoire de WeeChat, par exemple : "/home/xxxx/.weechat" -weechat.prnt("", "Répertoire WeeChat : %s" % weechat.info_get("weechat_dir", "")) +# répertoire de config WeeChat, par exemple : "/home/user/.config/weechat" +weechat.prnt("", "Répertoire de config WeeChat : %s" % weechat.info_get("weechat_config_dir", "")) # inactivité clavier weechat.prnt("", "Inactivité depuis %s secondes" % weechat.info_get("inactivity", "")) diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc index e4918ca0c..965cfba80 100644 --- a/doc/fr/weechat_user.fr.adoc +++ b/doc/fr/weechat_user.fr.adoc @@ -477,10 +477,10 @@ répertoire tel que _/var/lib/systemd/coredump_ et vous devez utiliser la comman Pour plus d'informations, voir cette page wiki : https://wiki.archlinux.org/index.php/Core_dump Par exemple si _weechat_ est installé dans _/usr/bin/_ et que le fichier -_core_ est dans _/home/xxx/_, alors lancez gdb avec cette commande : +_core_ est dans _/home/user/_, alors lancez gdb avec cette commande : ---- -gdb /usr/bin/weechat /home/xxx/core +gdb /usr/bin/weechat /home/user/core ---- Puis sous gdb, utilisez la commande `bt full` pour afficher la trace. @@ -567,8 +567,8 @@ exemple pour mettre à jour le noyau ou déplacer WeeChat vers une autre machine ---- Cela sauvegarde l'état actuel dans des fichiers `*.upgrade`. Vous pouvez soit -rebooter ou déplacer le répertoire entier `~/.weechat` vers une autre machine, -et redémarrer WeeChat plus tard avec cette commande : +rebooter ou déplacer les répertoires WeeChat (config, data, cache) vers une +autre machine, et redémarrer WeeChat plus tard avec cette commande : ---- $ weechat --upgrade @@ -601,7 +601,7 @@ WeeChat a un système de mise à jour automatique des fichiers de configuration Exemple d'avertissement lorsqu'une option a été supprimée : ---- -=!= Attention : /home/xxx/.weechat/sec.conf, ligne 15 : option inconnue pour la section "crypt" : passphrase_file = "" +=!= Attention : /home/user/.config/weechat/sec.conf, ligne 15 : option inconnue pour la section "crypt" : passphrase_file = "" ---- Cela signifie que l'option `sec.crypt.passphrase_file` a été supprimée, et vous @@ -621,7 +621,7 @@ $ weechat ---- Lorsque vous lancez WeeChat pour la première fois, les fichiers de configuration -par défaut sont créés dans _~/.weechat_ avec les options et valeurs par défaut +par défaut sont créés dans _~/.config/weechat_ avec les options et valeurs par défaut (voir <<files_and_directories,Fichiers et répertoires>>). ==== Options de ligne de commande @@ -651,10 +651,29 @@ Des variables d'environnement sont utilisées par WeeChat si elles sont définie [[files_and_directories]] === Fichiers et répertoires -WeeChat écrit ses fichiers de configuration et les autres données dans -`~/.weechat` par défaut. + -Ces fichiers sont créés avec les valeurs par défaut la première fois que vous -lancez WeeChat. +[[xdg_directories]] +==== XDG directories + +WeeChat utilise les répertoires XDG par défaut +(selon la https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[spécification "XDG Base Directory"]). + +Un répertoire de base unique pour tous les fichiers peut être forcé par +l'option CMake `WEECHAT_HOME`, la variable d'environnement `WEECHAT_HOME` ou +l'option de ligne de commande `-d` / `--dir`. + +Lorsqu'un répertoire de base unique n'est pas forcé, les répertoires XDG sont +utilisés et déterminés ainsi : + +[width="100%",cols="1,2m,5",options="header"] +|=== +| Répertoire | Valeur par défaut | Valeur de repli +| config | $XDG_CONFIG_HOME/weechat | `$HOME/.config/weechat` si `$XDG_CONFIG_HOME` n'est pas défini ou vide. +| data | $XDG_DATA_HOME/weechat | `$HOME/.local/share/weechat` si `$XDG_DATA_HOME` n'est pas défini ou vide. +| cache | $XDG_CACHE_HOME/weechat | `$HOME/.cache/weechat` si `$XDG_CACHE_HOME` n'est pas défini ou vide. +| runtime | $XDG_RUNTIME_DIR/weechat | Identique au répertoire _cache_ si `$XDG_RUNTIME_DIR` n'est pas défini ou vide. +|=== + +Les fichiers de configuration sont créés avec les valeurs par défaut la première +fois que vous lancez WeeChat. [[weechat_directories]] ==== Répertoires de WeeChat @@ -663,29 +682,34 @@ Les répertoires de WeeChat sont : [width="100%",cols="1m,3",options="header"] |=== -| Chemin/fichier | Description -| ~/.weechat/ | Répertoire principal de WeeChat (peut être changé, voir <<running_weechat,Lancer WeeChat>>). -| logs/ | Fichiers de log (un fichier par tampon). -| python/ | Scripts Python. -| autoload/ | Scripts Python chargés automatiquement au démarrage ^(1)^. -| perl/ | Scripts Perl. -| autoload/ | Scripts Perl chargés automatiquement au démarrage ^(1)^. -| ruby/ | Scripts Ruby. -| autoload/ | Scripts Ruby chargés automatiquement au démarrage ^(1)^. -| lua/ | Scripts Lua. -| autoload/ | Scripts Lua chargés automatiquement au démarrage ^(1)^. -| tcl/ | Scripts Tcl. -| autoload/ | Scripts Tcl chargés automatiquement au démarrage ^(1)^. -| guile/ | Scripts Guile. -| autoload/ | Scripts Guile chargés automatiquement au démarrage ^(1)^. -| javascript/ | Scripts JavaScript. -| autoload/ | Scripts JavaScript chargés automatiquement au démarrage ^(1)^. -| php/ | Scripts PHP. -| autoload/ | Scripts PHP chargés automatiquement au démarrage ^(1)^. +| Chemin ^(1)^ | Description +| ~/.config/weechat/ | Fichiers de configuration WeeChat : `*.conf`, certificats, etc. +| ~/.local/share/weechat/ | Fichiers de données WeeChat : logs, scripts, données des scripts, fichiers xfer, etc. +| logs/ | Fichiers de log (un fichier par tampon). +| python/ | Scripts Python. +| autoload/ | Scripts Python chargés automatiquement au démarrage ^(2)^. +| perl/ | Scripts Perl. +| autoload/ | Scripts Perl chargés automatiquement au démarrage ^(2)^. +| ruby/ | Scripts Ruby. +| autoload/ | Scripts Ruby chargés automatiquement au démarrage ^(2)^. +| lua/ | Scripts Lua. +| autoload/ | Scripts Lua chargés automatiquement au démarrage ^(2)^. +| tcl/ | Scripts Tcl. +| autoload/ | Scripts Tcl chargés automatiquement au démarrage ^(2)^. +| guile/ | Scripts Guile. +| autoload/ | Scripts Guile chargés automatiquement au démarrage ^(2)^. +| javascript/ | Scripts JavaScript. +| autoload/ | Scripts JavaScript chargés automatiquement au démarrage ^(2)^. +| php/ | Scripts PHP. +| autoload/ | Scripts PHP chargés automatiquement au démarrage ^(2)^. +| ~/.cache/weechat/ | Fichiers de cache WeeChat : cache des scripts. +| /run/user/1000/weechat/ | Fichiers "runtime" WeeChat : tube FIFO, sockets UNIX Relay. |=== [NOTE] -^(1)^ Ce répertoire contient souvent seulement des liens symboliques vers les +^(1)^ Les répertoires XDG peuvent être différents selon vos variables +d'environnement `XDG_*`. + +^(2)^ Ce répertoire contient souvent seulement des liens symboliques vers les scripts dans le répertoire parent. [[weechat_files]] @@ -2808,7 +2832,7 @@ Vous pouvez contrôler WeeChat à distance, en envoyant des commandes ou du texte dans un tube FIFO (si l'option _fifo.file.enabled_ est activée, elle l'est par défaut). -Le tube FIFO est dans le répertoire _~/.weechat/_ et s'appelle _weechat_fifo_ +Le tube FIFO est dans le répertoire WeeChat "runtime" et s'appelle _weechat_fifo_ par défaut. La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO est une @@ -2824,26 +2848,26 @@ Quelques exemples : * Changer le pseudo sur freenode en "autrepseudo" : ---- -$ echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo +$ echo 'irc.server.freenode */nick autrepseudo' >/run/user/1000/weechat/weechat_fifo ---- * Envoyer un message sur le canal IRC #weechat : ---- -$ echo 'irc.freenode.#weechat *bonjour !' >~/.weechat/weechat_fifo +$ echo 'irc.freenode.#weechat *bonjour !' >/run/user/1000/weechat/weechat_fifo ---- * Envoyer un message sur le tampon courant : ---- -$ echo '*bonjour !' >~/.weechat/weechat_fifo +$ echo '*bonjour !' >/run/user/1000/weechat/weechat_fifo ---- * Envoyer deux commandes pour décharger/recharger les scripts Python (vous devez les séparer par "\n") : ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo +$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo ---- [[fifo_commands]] @@ -3490,7 +3514,7 @@ dans le masque (voir `man strftime` pour le format), par exemple : Vous obtiendrez les fichiers suivants : .... -~/.weechat +~/.local/share/weechat └── logs ├── 2010 │ ├── 11 @@ -3519,7 +3543,7 @@ Si vous voulez un répertoire par serveur IRC et un fichier par canal dedans : Vous obtiendrez les fichiers suivants : .... -~/.weechat +~/.local/share/weechat └── logs └── irc ├── freenode @@ -3737,12 +3761,14 @@ vous pouvez écouter avec n'importe quel protocole sur un socket UNIX et un chemin donné. Par exemple : ---- -/relay add unix.weechat %h/relay_socket +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ---- Cela autorise les clients à se connecter en utilisant le protocole weechat à -_~/.weechat/relay_socket_. Cela est utile pour autoriser le "SSH forwarding" -pour les clients relay, quand d'autres ports ne peuvent pas être ouverts. +_/run/user/1000/weechat/relay_socket_. Cela est utile pour autoriser le +"SSH forwarding" pour les clients relay, quand d'autres ports ne peuvent pas +être ouverts. + Avec OpenSSH : ---- diff --git a/doc/it/includes/cmdline_options.it.adoc b/doc/it/includes/cmdline_options.it.adoc index 7be2504b4..0fe1327ff 100644 --- a/doc/it/includes/cmdline_options.it.adoc +++ b/doc/it/includes/cmdline_options.it.adoc @@ -18,9 +18,9 @@ // TRANSLATION MISSING *-d*, *--dir* _<path>_:: - Imposta una directory come home per WeeChat (utilizzata per i file di - configurazione, log, plugin e script dell'utente), il valore predefinito - è "~/.weechat" (nota: directory viene creata se non trovata da WeeChat). + Force a single directory for all WeeChat files (directory is created if not found). + Four directories can be given, separated by colons (in this order: config, + data, cache, runtime). If this option is not given, the environment variable WEECHAT_HOME is used (if not empty). diff --git a/doc/it/includes/man.it.adoc b/doc/it/includes/man.it.adoc index ab9c8eca4..a9964d31c 100644 --- a/doc/it/includes/man.it.adoc +++ b/doc/it/includes/man.it.adoc @@ -19,79 +19,79 @@ example: // tag::files[] // TRANSLATION MISSING -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: main WeeChat configuration file -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: plugins configuration file -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: configuration file with secured data -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: configuration file for _alias_ plugin -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: configuration file for _buflist_ plugin -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: configuration file for _charset_ plugin -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: configuration file for _exec_ plugin -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: configuration file for _fifo_ plugin -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: configuration file for _fset_ plugin -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: configuration file for _guile_ plugin -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: configuration file for _irc_ plugin -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: configuration file for _javascript_ plugin -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: configuration file for _logger_ plugin -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: configuration file for _lua_ plugin -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: configuration file for _perl_ plugin -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: configuration file for _php_ plugin -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: configuration file for _python_ plugin -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: configuration file for _relay_ plugin -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: configuration file for _ruby_ plugin -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: configuration file for _script_ plugin -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: configuration file for _spell_ plugin -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: configuration file for _tcl_ plugin -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: configuration file for _trigger_ plugin -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: configuration file for _xfer_ plugin -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: WeeChat log file // end::files[] diff --git a/doc/it/weechat_faq.it.adoc b/doc/it/weechat_faq.it.adoc index d35d7c36c..e44347615 100644 --- a/doc/it/weechat_faq.it.adoc +++ b/doc/it/weechat_faq.it.adoc @@ -1141,9 +1141,12 @@ First check questions about SSL connection in this FAQ If still not working, try to manually delete the scripts file (in your shell): ---- -$ rm ~/.weechat/script/plugins.xml.gz +$ rm ~/.cache/weechat/script/plugins.xml.gz ---- +[NOTE] +With WeeChat ≤ 3.1, the path should be: _~/.weechat/script/plugins.xml.gz_. + And update scripts again in WeeChat: ---- @@ -1163,7 +1166,7 @@ have to update manually the file yourself to get updates): * in your shell, with curl installed: ---- -$ cd ~/.weechat/script +$ cd ~/.cache/weechat/script $ curl -O https://weechat.org/files/plugins.xml.gz ---- @@ -1294,10 +1297,9 @@ For example: [[sharing_config_files]] === I want to share my WeeChat configuration, what files should I share and what should I keep private? -You can share files _~/.weechat/*.conf_ except the file _sec.conf_ which +You can share configuration files _*.conf_ except the file _sec.conf_ which contains your passwords ciphered with your passphrase. -// TRANSLATION MISSING Some other files may contain sensitive info like passwords (if they are not stored in _sec.conf_ with the `/secure` command). diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index b6a1ed419..26dac71b4 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -198,7 +198,7 @@ $ gcc -shared -fPIC -o tizio.so tizio.o Copiare il file _tizio.so_ nella cartella plugin di sistema (ad esempio _/usr/local/lib/weechat/plugins_) oppure nella cartella -plugin dell'utente (ad esempio _/home/xxx/.weechat/plugins_). +plugin dell'utente (ad esempio _/home/user/.local/share/weechat/plugins_). In WeeChat: @@ -1076,7 +1076,7 @@ Esempio in C: [source,C] ---- char *str = weechat_string_expand_home ("~/file.txt"); -/* result: "/home/xxx/file.txt" */ +/* result: "/home/user/file.txt" */ /* ... */ free (str); ---- @@ -1086,12 +1086,12 @@ Questa funzione non è disponibile nelle API per lo scripting. ==== string_eval_path_home -_WeeChat ≥ 1.3._ +_WeeChat ≥ 1.3, updated in 3.2._ // TRANSLATION MISSING Evaluate a path in 3 steps: -. replace leading `%h` by WeeChat home directory, +. replace leading `%h` by a WeeChat directory (data by default), . replace leading `+~+` by user home directory (call to <<_string_expand_home,string_expand_home>>), . evaluate variables (see <<_string_eval_expression,string_eval_expression>>). @@ -1115,7 +1115,13 @@ Argomenti: * _extra_vars_: hashtable for call to function <<_string_eval_expression,string_eval_expression>> * _options_: hashtable for call to function - <<_string_eval_expression,string_eval_expression>> + <<_string_eval_expression,string_eval_expression>>, with one extra key + supported: +** _directory_: WeeChat directory to use when replacing `%h`, one of: +*** _config_ +*** _data_ (default) +*** _cache_ +*** _runtime_ // TRANSLATION MISSING Valore restituito: @@ -1126,8 +1132,8 @@ Esempio in C: [source,C] ---- -char *str = weechat_string_eval_path_home ("%h/test", NULL, NULL, NULL); -/* result: "/home/xxx/.weechat/test" */ +char *str = weechat_string_eval_path_home ("${weechat_config_dir}/test.conf", NULL, NULL, NULL); +/* result: "/home/user/.config/weechat/test.conf" */ /* ... */ free (str); ---- @@ -1140,8 +1146,8 @@ Script (Python): path = weechat.string_eval_path_home(path, pointers, extra_vars, options) # esempio -path = weechat.string_eval_path_home("%h/test", {}, {}, {}) -# path == "/home/xxx/.weechat/test" +path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {}) +# path == "/home/user/.config/weechat/test.conf" ---- ==== string_remove_quotes @@ -2648,6 +2654,19 @@ expanded to last): `+${name}+` | `+value+` +// TRANSLATION MISSING +| `+${weechat_xxx_dir}+` | + A WeeChat directory: `+${weechat_config_dir}+`, `+${weechat_data_dir}+`, + `+${weechat_cache_dir}+` or `+${weechat_runtime_dir}+`. | + `+${weechat_config_dir}+` + + `+${weechat_data_dir}+` + + `+${weechat_cache_dir}+` + + `+${weechat_runtime_dir}+` | + `+/home/user/.config/weechat+` + + `+/home/user/.local/share/weechat+` + + `+/home/user/.cache/weechat+` + + `+/run/user/1000/weechat+` + | `+${eval:xxx}+` + _(WeeChat ≥ 1.3)_ | String to evaluate. | @@ -2769,9 +2788,9 @@ expanded to last): Result of a modifier, see function <<_hook_modifier_exec,hook_modifier_exec>>. | `+${modifier:eval_path_home,,~}+` + - `+${modifier:eval_path_home,,%h/python}+` | - `+/home/xxx+` + - `+/home/xxx/.weechat/python+` + `+${modifier:eval_path_home,directory=config,%h/weechat.conf}+` | + `+/home/user+` + + `+/home/user/.config/weechat/weechat.conf+` | `+${info:name}+` + `+${info:name,arguments}+` + @@ -3760,6 +3779,9 @@ Alcune funzioni legate alle cartelle. ==== mkdir_home +// TRANSLATION MISSING +_Updated in 3.2._ + Crea una cartella nella home di WeeChat. Prototipo: @@ -3771,7 +3793,13 @@ int weechat_mkdir_home (char *directory, int mode); Argomenti: -* _directory_: nome della cartella da creare +// TRANSLATION MISSING +* _directory_: name of directory to create; it can start with one of these + strings to force a specific WeeChat directory (WeeChat ≥ 3.2): +** `${weechat_config_dir}` +** `${weechat_data_dir}` (default) +** `${weechat_cache_dir}` +** `${weechat_runtime_dir}` * _mode_: modalità per la cartella Valore restituito: @@ -3782,7 +3810,7 @@ Esempio in C: [source,C] ---- -if (!weechat_mkdir_home ("temp", 0755)) +if (!weechat_mkdir_home ("${weechat_cache_dir}/temp", 0755)) { /* errore */ } @@ -3796,7 +3824,7 @@ Script (Python): weechat.mkdir_home(directory, mode) # esempio -weechat.mkdir_home("temp", 0755) +weechat.mkdir_home("${weechat_cache_dir}/temp", 0755) ---- ==== mkdir @@ -11383,10 +11411,10 @@ del linguaggio: La callback compirà le seguenti azioni alla ricezione del segnale: . Scarica e rimuove lo script installato. -. Sposta il nuovo script nella cartella _~/.weechat/xxx/_ (dove _xxx_ è il +. Sposta il nuovo script nella cartella _~/.local/share/weechat/xxx/_ (dove _xxx_ è il linguaggio). // TRANSLATION MISSING -. Crea un link al nuovo script nella cartella _~/.weechat/xxx/autoload/_ +. Crea un link al nuovo script nella cartella _~/.local/share/weechat/xxx/autoload/_ (only if the script was already auto-loaded, or if the option _script.scripts.autoload_ is enabled for a new script). // TRANSLATION MISSING @@ -11401,16 +11429,14 @@ Esempio in C: [source,C] ---- -weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py"); +weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py"); ---- Script (Python): [source,python] ---- -weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py") +weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py") ---- [[signals_xxx_script_remove]] @@ -12243,7 +12269,7 @@ List of modifiers defined by WeeChat and plugins that can be used: // TRANSLATION MISSING | [[hook_modifier_eval_path_home]] eval_path_home + _(WeeChat ≥ 2.7)_ | - - | + Optional: `directory=xxx` where `xxx` can be: `config`, `data`, `cache`, `runtime` | Any string. | Evaluated path, result of the function <<_string_eval_path_home,string_eval_path_home>>. @@ -16048,10 +16074,10 @@ if (version) if (date) free (date); -char *weechat_dir = weechat_info_get ("weechat_dir", NULL); -weechat_printf (NULL, "WeeChat home is: %s", weechat_dir); -if (weechat_dir) - free (weechat_dir); +char *weechat_config_dir = weechat_info_get ("weechat_config_dir", NULL); +weechat_printf (NULL, "WeeChat config directory is: %s", weechat_config_dir); +if (weechat_config_dir) + free (weechat_config_dir); ---- Script (Python): @@ -16064,7 +16090,7 @@ value = weechat.info_get(info_name, arguments) # esempio weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)" % (weechat.info_get("version", ""), weechat.info_get("date", "")) -weechat.prnt("", "WeeChat home is: %s" % weechat.info_get("weechat_dir")) +weechat.prnt("", "WeeChat config directory is: %s" % weechat.info_get("weechat_config_dir")) ---- ==== info_get_hashtable diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc index 54a621c7d..aec390c96 100644 --- a/doc/it/weechat_scripting.it.adoc +++ b/doc/it/weechat_scripting.it.adoc @@ -358,7 +358,7 @@ automaticamente gli script all'avvio di WeeChat. Ad esempio con Python: ---- -$ cd ~/.weechat/python/autoload +$ cd ~/.local/share/weechat/python/autoload $ ln -s ../script.py ---- @@ -1425,10 +1425,11 @@ weechat.prnt("", "Version %s" % weechat.info_get("version", "")) [[infos_other]] ==== Altre informazioni +// TRANSLATION MISSING [source,python] ---- -# la directory home di WeeChat, ad esempio: "/home/xxxx/.weechat" -weechat.prnt("", "WeeChat home dir: %s" % weechat.info_get("weechat_dir", "")) +# WeeChat config directory, for example: "/home/user/.config/weechat" +weechat.prnt("", "WeeChat config dir: %s" % weechat.info_get("weechat_config_dir", "")) # inattività della tastiera weechat.prnt("", "Inactivity since %s seconds" % weechat.info_get("inactivity", "")) diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc index 917e06b36..f19cb5eba 100644 --- a/doc/it/weechat_user.it.adoc +++ b/doc/it/weechat_user.it.adoc @@ -521,10 +521,10 @@ _/var/lib/systemd/coredump_ and you must use the command `coredumpctl` to read i For more information, see this wiki page: https://wiki.archlinux.org/index.php/Core_dump Ad esempio, se _weechat_ è installato in _/usr/bin/_ ed il file _core_ -si trova in _/home/xxx/_, allora eseguire gdb con questo comando: +si trova in _/home/user/_, allora eseguire gdb con questo comando: ---- -gdb /usr/bin/weechat /home/xxx/core +gdb /usr/bin/weechat /home/user/core ---- All'interno di gdb, usare il comando `bt full` per visualizzare @@ -612,8 +612,8 @@ to upgrade the kernel or to move your WeeChat to another machine: ---- This saves the current state in `*.upgrade` files. You can then either reboot -or move the whole directory `~/.weechat` to another machine, and restart -WeeChat later with this command: +or move the whole WeeChat directories (config, data, cache) to another machine, +and restart WeeChat later with this command: ---- $ weechat --upgrade @@ -646,7 +646,7 @@ WeeChat has an automatic upgrade of configuration files (`*.conf`): Example of warning when an option has been removed: ---- -=!= Attenzione: /home/xxx/.weechat/sec.conf, riga 15: opzione sconosciuta per la sezione "crypt": passphrase_file = "" +=!= Attenzione: /home/user/.config/weechat/sec.conf, riga 15: opzione sconosciuta per la sezione "crypt": passphrase_file = "" ---- That means the option `sec.crypt.passphrase_file` has been removed, and you @@ -667,7 +667,7 @@ $ weechat // TRANSLATION MISSING When you run WeeChat for the first time, the default configuration files are -created in _~/.weechat_ with default options and values +created in _~/.config/weechat_ with default options and values (see <<files_and_directories,Files and directories>>). // TRANSLATION MISSING @@ -701,9 +701,27 @@ Some environment variables are used by WeeChat if they are defined: [[files_and_directories]] === Files and directories -WeeChat writes configuration files and other data in directory `~/.weechat` -by default. + -These files are created with default values the first time you run WeeChat. +[[xdg_directories]] +==== XDG directories + +WeeChat uses XDG directories by default +(according to the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG Base Directory Specification]). + +A single home directory for all files can be forced by CMake option `WEECHAT_HOME`, +the environment variable `WEECHAT_HOME` or the command-line option `-d` / `--dir`. + +When a single WeeChat home directory is not forced, XDG directories are used +and set like this: + +[width="100%",cols="1,2m,5",options="header"] +|=== +| Directory | Default value | Fallback value +| config | $XDG_CONFIG_HOME/weechat | `$HOME/.config/weechat` if `$XDG_CONFIG_HOME` is not defined or empty. +| data | $XDG_DATA_HOME/weechat | `$HOME/.local/share/weechat` if `$XDG_DATA_HOME` is not defined or empty. +| cache | $XDG_CACHE_HOME/weechat | `$HOME/.cache/weechat` if `$XDG_CACHE_HOME` is not defined or empty. +| runtime | $XDG_RUNTIME_DIR/weechat | Same as _cache_ directory if `$XDG_RUNTIME_DIR` is not defined or empty. +|=== + +The configuration files are created with default values the first time you run WeeChat. [[weechat_directories]] ==== WeeChat directories @@ -712,29 +730,33 @@ The WeeChat directories are: [width="100%",cols="1m,3",options="header"] |=== -| Path/file | Description -| ~/.weechat/ | WeeChat home directory (can be changed, see <<running_weechat,Running WeeChat>>). -| logs/ | Log files (one file per buffer). -| python/ | Python scripts. -| autoload/ | Python scripts auto-loaded on startup ^(1)^. -| perl/ | Perl scripts. -| autoload/ | Perl scripts auto-loaded on startup ^(1)^. -| ruby/ | Ruby scripts. -| autoload/ | Ruby scripts auto-loaded on startup ^(1)^. -| lua/ | Lua scripts. -| autoload/ | Lua scripts auto-loaded on startup ^(1)^. -| tcl/ | Tcl scripts. -| autoload/ | Tcl scripts auto-loaded on startup ^(1)^. -| guile/ | Guile scripts. -| autoload/ | Guile scripts auto-loaded on startup ^(1)^. -| javascript/ | JavaScript scripts. -| autoload/ | JavaScript scripts auto-loaded on startup ^(1)^. -| php/ | PHP scripts. -| autoload/ | PHP scripts auto-loaded on startup ^(1)^. +| Path ^(1)^ | Description +| ~/.config/weechat/ | WeeChat configuration files: `*.conf`, certificates, etc. +| ~/.local/share/weechat/ | WeeChat data files: logs, scripts, scripts data, xfer files, etc. +| logs/ | Log files (one file per buffer). +| python/ | Python scripts. +| autoload/ | Python scripts auto-loaded on startup ^(2)^. +| perl/ | Perl scripts. +| autoload/ | Perl scripts auto-loaded on startup ^(2)^. +| ruby/ | Ruby scripts. +| autoload/ | Ruby scripts auto-loaded on startup ^(2)^. +| lua/ | Lua scripts. +| autoload/ | Lua scripts auto-loaded on startup ^(2)^. +| tcl/ | Tcl scripts. +| autoload/ | Tcl scripts auto-loaded on startup ^(2)^. +| guile/ | Guile scripts. +| autoload/ | Guile scripts auto-loaded on startup ^(2)^. +| javascript/ | JavaScript scripts. +| autoload/ | JavaScript scripts auto-loaded on startup ^(2)^. +| php/ | PHP scripts. +| autoload/ | PHP scripts auto-loaded on startup ^(2)^. +| ~/.cache/weechat/ | WeeChat cache files: scripts cache. +| /run/user/1000/weechat/ | WeeChat runtime files: FIFO pipe, Relay UNIX sockets. |=== [NOTE] -^(1)^ This directory often contains only symbolic links to scripts in parent directory. +^(1)^ XDG directories may be different according to your environment variables `XDG_*`. + +^(2)^ This directory often contains only symbolic links to scripts in parent directory. [[weechat_files]] ==== WeeChat files @@ -2918,7 +2940,8 @@ include::includes/autogen_user_options.it.adoc[tag=exec_options] pipe FIFO (se l'opzione "fifo.file.enabled" è abilitata, e lo è per default). // TRANSLATION MISSING -The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default. +The FIFO pipe is located in WeeChat runtime directory and is called +_weechat_fifo_ by default. La sintassi per i comandi/testo della pipe FIFO è una delle seguenti: @@ -2933,28 +2956,28 @@ Alcuni esempi: * Change nick on IRC server freenode to "newnick": ---- -$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo +$ echo 'irc.server.freenode */nick newnick' >/run/user/1000/weechat/weechat_fifo ---- // TRANSLATION MISSING * Send a message on IRC #weechat channel: ---- -$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo +$ echo 'irc.freenode.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo ---- // TRANSLATION MISSING * Send a message on current buffer: ---- -$ echo '*hello!' >~/.weechat/weechat_fifo +$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo ---- * Inviare due comandi per scaricare/caricare gli script Python (è necessario separarli con "\n"): ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo +$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo ---- [[fifo_commands]] @@ -3638,7 +3661,7 @@ nei mask (consultare `man stfrtime` per i formati), ad esempio: Si avranno i seguenti file: .... -~/.weechat +~/.local/share/weechat └── logs ├── 2010 │ ├── 11 @@ -3668,7 +3691,7 @@ al suo interno: Si avranno i seguenti file: .... -~/.weechat +~/.local/share/weechat └── logs └── irc ├── freenode @@ -3887,12 +3910,14 @@ Using the protocol option "unix" with the `/relay add` command, you can listen using any protocol on a UNIX domain socket at a given path. For example: ---- -/relay add unix.weechat %h/relay_socket +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ---- This allows clients to connect using the weechat protocol to -_~/.weechat/relay_socket_. This is particularly useful to allow SSH forwarding -for relay clients, when other ports cannot be opened. Using OpenSSH: +_/run/user/1000/weechat/relay_socket_. This is particularly useful to allow +SSH forwarding for relay clients, when other ports cannot be opened. + +Using OpenSSH: ---- $ ssh -L 9000:.weechat/relay_socket user@hostname diff --git a/doc/ja/includes/cmdline_options.ja.adoc b/doc/ja/includes/cmdline_options.ja.adoc index bcd506296..e01d3337b 100644 --- a/doc/ja/includes/cmdline_options.ja.adoc +++ b/doc/ja/includes/cmdline_options.ja.adoc @@ -15,10 +15,11 @@ (works only with the command *weechat-headless*, not compatible with option "--daemon"). +// TRANSLATION MISSING *-d*, *--dir* _<path>_:: - WeeChat のホームディレクトリを path に設定 (設定ファイル、ログ、 - ユーザプラグイン、スクリプトに利用される)、初期値は "~/.weechat"。 - (注意: パスが存在しない場合は WeeChat がディレクトリを作成します) + Force a single directory for all WeeChat files (directory is created if not found). + Four directories can be given, separated by colons (in this order: config, + data, cache, runtime). このオプションを指定しなかった場合、環境変数 WEECHAT_HOME を使います (空でない限り)。 diff --git a/doc/ja/includes/man.ja.adoc b/doc/ja/includes/man.ja.adoc index 0ce223e0b..6ff9d7486 100644 --- a/doc/ja/includes/man.ja.adoc +++ b/doc/ja/includes/man.ja.adoc @@ -17,79 +17,79 @@ IPv6 アドレスの後にポートを指定するには IPv6 // end::plugin_options[] // tag::files[] -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: WeeChat の主要設定ファイル -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: プラグイン設定ファイル -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: 保護されたデータを含む設定ファイル -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: _alias_ プラグイン用の設定ファイル -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: _buflist_ プラグイン用の設定ファイル -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: _charset_ プラグイン用の設定ファイル -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: _exec_ プラグイン用の設定ファイル -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: _fifo_ プラグイン用の設定ファイル -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: _fset_ プラグイン用の設定ファイル -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: _guile_ プラグイン用の設定ファイル -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: _irc_ プラグイン用の設定ファイル -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: _javascript_ プラグイン用の設定ファイル -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: _logger_ プラグイン用の設定ファイル -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: _lua_ プラグイン用の設定ファイル -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: _perl_ プラグイン用の設定ファイル -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: _php_ プラグイン用の設定ファイル -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: _python_ プラグイン用の設定ファイル -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: _relay_ プラグイン用の設定ファイル -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: _ruby_ プラグイン用の設定ファイル -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: _script_ プラグイン用の設定ファイル -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: _spell_ プラグイン用の設定ファイル -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: _tcl_ プラグイン用の設定ファイル -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: _trigger_ プラグイン用の設定ファイル -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: _xfer_ プラグイン用の設定ファイル -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: WeeChat ログファイル // end::files[] diff --git a/doc/ja/weechat_faq.ja.adoc b/doc/ja/weechat_faq.ja.adoc index b9447fe84..876ab87df 100644 --- a/doc/ja/weechat_faq.ja.adoc +++ b/doc/ja/weechat_faq.ja.adoc @@ -1056,9 +1056,13 @@ weeget.py と script.pl を使ってください。 それでもだめなら、手作業で (シェルから) スクリプトリストファイルを削除してください: ---- -$ rm ~/.weechat/script/plugins.xml.gz +$ rm ~/.cache/weechat/script/plugins.xml.gz ---- +// TRANSLATION MISSING +[NOTE] +With WeeChat ≤ 3.1, the path should be: _~/.weechat/script/plugins.xml.gz_. + その後、WeeChat からスクリプトリストを更新してください: ---- @@ -1078,7 +1082,7 @@ $ rm ~/.weechat/script/plugins.xml.gz * シェルからスクリプトリストファイルをダウンロードします (必要なら curl をインストールしてください): ---- -$ cd ~/.weechat/script +$ cd ~/.cache/weechat/script $ curl -O https://weechat.org/files/plugins.xml.gz ---- @@ -1194,8 +1198,9 @@ link:weechat_user.ja.html#secured_data[ユーザーズガイド / 暗号化デ [[sharing_config_files]] === WeeChat の設定を共有したいのですが、公開しても良いファイルと秘密にしておくべきファイルを教えてください。 -_~/.weechat/*.conf_ ファイルは公開しても問題ありませんが、 -パスフレーズで暗号化されたパスワードが含まれる _sec.conf_ ファイルは秘密にしてください。 +// TRANSLATION MISSING +You can share configuration files _*.conf_ except the file _sec.conf_ which +contains your passwords ciphered with your passphrase. // TRANSLATION MISSING Some other files may contain sensitive info like passwords (if they are not diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 26aaabae6..fecc08ad7 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -187,7 +187,7 @@ $ gcc -shared -fPIC -o toto.so toto.o _toto.so_ ファイルをシステムのプラグインディレクトリ (例えば _/usr/local/lib/weechat/plugins_) またはユーザのプラグインディレクトリ (例えば -_/home/xxx/.weechat/plugins_) にコピーしてください。 +_/home/user/.local/share/weechat/plugins_) にコピーしてください。 WeeChat の中で: @@ -1036,7 +1036,7 @@ C 言語での使用例: [source,C] ---- char *str = weechat_string_expand_home ("~/file.txt"); -/* result: "/home/xxx/file.txt" */ +/* result: "/home/user/file.txt" */ /* ... */ free (str); ---- @@ -1046,11 +1046,13 @@ free (str); ==== string_eval_path_home -_WeeChat バージョン 0.3.3 以上で利用可。_ +// TRANSLATION MISSING +_WeeChat ≥ 1.3, updated in 3.2._ 3 段階でパスを評価します: -. 先頭の `%h` を WeeChat ホームディレクトリで置換し、 +// TRANSLATION MISSING +. replace leading `%h` by a WeeChat directory (data by default), . 先頭の `+~+` をユーザのホームディレクトリで置換し (<<_string_expand_home,string_expand_home>> を実行し)、 . 変数を評価します @@ -1068,13 +1070,20 @@ char *weechat_string_eval_path_home (const char *path, 引数: +// TRANSLATION MISSING * _path_: パス * _pointers_: 関数に渡されるハッシュテーブル <<_string_eval_expression,string_eval_expression>> * _extra_vars_: 関数に渡されるハッシュテーブル <<_string_eval_expression,string_eval_expression>> -* _options_: 関数に渡されるハッシュテーブル - <<_string_eval_expression,string_eval_expression>> +* _options_: hashtable for call to function + <<_string_eval_expression,string_eval_expression>>, with one extra key + supported: +** _directory_: WeeChat directory to use when replacing `%h`, one of: +*** _config_ +*** _data_ (default) +*** _cache_ +*** _runtime_ 戻り値: @@ -1084,8 +1093,8 @@ C 言語での使用例: [source,C] ---- -char *str = weechat_string_eval_path_home ("%h/test", NULL, NULL, NULL); -/* result: "/home/xxx/.weechat/test" */ +char *str = weechat_string_eval_path_home ("${weechat_config_dir}/test.conf", NULL, NULL, NULL); +/* result: "/home/user/.config/weechat/test.conf" */ /* ... */ free (str); ---- @@ -1098,8 +1107,8 @@ free (str); path = weechat.string_eval_path_home(path, pointers, extra_vars, options) # 例 -path = weechat.string_eval_path_home("%h/test", {}, {}, {}) -# path == "/home/xxx/.weechat/test" +path = weechat.string_eval_path_home("${weechat_config_dir}/test.conf", {}, {}, {}) +# path == "/home/user/.config/weechat/test.conf" ---- ==== string_remove_quotes @@ -2560,6 +2569,19 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio `+${name}+` | `+value+` +// TRANSLATION MISSING +| `+${weechat_xxx_dir}+` | + A WeeChat directory: `+${weechat_config_dir}+`, `+${weechat_data_dir}+`, + `+${weechat_cache_dir}+` or `+${weechat_runtime_dir}+`. | + `+${weechat_config_dir}+` + + `+${weechat_data_dir}+` + + `+${weechat_cache_dir}+` + + `+${weechat_runtime_dir}+` | + `+/home/user/.config/weechat+` + + `+/home/user/.local/share/weechat+` + + `+/home/user/.cache/weechat+` + + `+/run/user/1000/weechat+` + | `+${eval:xxx}+` + _(WeeChat バージョン 1.3 以上で利用可)_ | 評価する文字列 | @@ -2687,9 +2709,9 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio Result of a modifier, see function <<_hook_modifier_exec,hook_modifier_exec>>. | `+${modifier:eval_path_home,,~}+` + - `+${modifier:eval_path_home,,%h/python}+` | - `+/home/xxx+` + - `+/home/xxx/.weechat/python+` + `+${modifier:eval_path_home,directory=config,%h/weechat.conf}+` | + `+/home/user+` + + `+/home/user/.config/weechat/weechat.conf+` | `+${info:name}+` + `+${info:name,arguments}+` + @@ -3648,6 +3670,8 @@ rc = weechat_crypto_hash_pbkdf2 (data, strlen (data), "sha256", salt, strlen (sa ==== mkdir_home +_WeeChat バージョン 3.2 で更新。_ + WeeChat ホームディレクトリの下にディレクトリを作成。 プロトタイプ: @@ -3659,7 +3683,13 @@ int weechat_mkdir_home (char *directory, int mode); 引数: -* _directory_: 作成するディレクトリの名前 +// TRANSLATION MISSING +* _directory_: name of directory to create; it can start with one of these + strings to force a specific WeeChat directory (WeeChat ≥ 3.2): +** `${weechat_config_dir}` +** `${weechat_data_dir}` (default) +** `${weechat_cache_dir}` +** `${weechat_runtime_dir}` * _mode_: ディレクトリのモード 戻り値: @@ -3670,7 +3700,7 @@ C 言語での使用例: [source,C] ---- -if (!weechat_mkdir_home ("temp", 0755)) +if (!weechat_mkdir_home ("${weechat_cache_dir}/temp", 0755)) { /* error */ } @@ -3684,7 +3714,7 @@ if (!weechat_mkdir_home ("temp", 0755)) weechat.mkdir_home(directory, mode) # 例 -weechat.mkdir_home("temp", 0755) +weechat.mkdir_home("${weechat_cache_dir}/temp", 0755) ---- ==== mkdir @@ -10959,8 +10989,8 @@ weechat.hook_signal_send("logger_backlog", weechat.WEECHAT_HOOK_SIGNAL_POINTER, シグナルを受け取ったらコールバックは以下のように働きます: . インストール済みスクリプトをリロードして削除。 -. 新しいスクリプトをディレクトリ _~/.weechat/xxx/_ に移動 (_xxx_ はプログラミング言語) -. 新しいスクリプトへのリンクをディレクトリ _~/.weechat/xxx/autoload/_ に作成 +. 新しいスクリプトをディレクトリ _~/.local/share/weechat/xxx/_ に移動 (_xxx_ はプログラミング言語) +. 新しいスクリプトへのリンクをディレクトリ _~/.local/share/weechat/xxx/autoload/_ に作成 (古いスクリプトがすでに自動ロードされていた場合、もしくは新しいスクリプトに対してオプション _script.scripts.autoload_ が有効化されている場合のみ作成されます) . 新しいスクリプトを読み込む (古いスクリプトがロードされていた場合のみ) @@ -10973,16 +11003,14 @@ C 言語での使用例: [source,C] ---- -weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py"); +weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py"); ---- スクリプト (Python) での使用例: [source,python] ---- -weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, - "/home/xxx/.weechat/test.py") +weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/path/to/test.py") ---- [[signals_xxx_script_remove]] @@ -11776,7 +11804,7 @@ WeeChat とプラグインが定義する修飾子のリスト: // TRANSLATION MISSING | [[hook_modifier_eval_path_home]] eval_path_home + _(WeeChat バージョン 2.7 以上で利用可)_ | - - | + Optional: `directory=xxx` where `xxx` can be: `config`, `data`, `cache`, `runtime` | Any string. | Evaluated path, result of the function <<_string_eval_path_home,string_eval_path_home>>. @@ -15436,10 +15464,10 @@ if (version) if (date) free (date); -char *weechat_dir = weechat_info_get ("weechat_dir", NULL); -weechat_printf (NULL, "WeeChat home is: %s", weechat_dir); -if (weechat_dir) - free (weechat_dir); +char *weechat_config_dir = weechat_info_get ("weechat_config_dir", NULL); +weechat_printf (NULL, "WeeChat config directory is: %s", weechat_config_dir); +if (weechat_config_dir) + free (weechat_config_dir); ---- スクリプト (Python) での使用例: @@ -15452,7 +15480,7 @@ value = weechat.info_get(info_name, arguments) # 例 weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)" % (weechat.info_get("version", ""), weechat.info_get("date", "")) -weechat.prnt("", "WeeChat home is: %s" % weechat.info_get("weechat_dir", "")) +weechat.prnt("", "WeeChat config directory is: %s" % weechat.info_get("weechat_config_dir", "")) ---- ==== info_get_hashtable diff --git a/doc/ja/weechat_relay_protocol.ja.adoc b/doc/ja/weechat_relay_protocol.ja.adoc index f026c97d2..36197ae2c 100644 --- a/doc/ja/weechat_relay_protocol.ja.adoc +++ b/doc/ja/weechat_relay_protocol.ja.adoc @@ -606,15 +606,15 @@ inf: ('version_number', '34144256') * Request WeeChat directory: ---- -(info_weechat_dir) info weechat_dir +(info_weechat_config_dir) info weechat_config_dir ---- Response: [source,python] ---- -id: 'info_weechat_dir' -inf: ('weechat_dir', '/home/xxx/.weechat') +id: 'info_weechat_config_dir' +inf: ('weechat_config_dir', '/home/user/.config/weechat') ---- [[command_infolist]] diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc index 54603ae66..616fe96f5 100644 --- a/doc/ja/weechat_scripting.ja.adoc +++ b/doc/ja/weechat_scripting.ja.adoc @@ -355,7 +355,7 @@ _language/autoload_ ディレクトリ内にリンクを作ってください。 例えば Python の場合: ---- -$ cd ~/.weechat/python/autoload +$ cd ~/.local/share/weechat/python/autoload $ ln -s ../script.py ---- @@ -1399,10 +1399,11 @@ weechat.prnt("", "Version %s" % weechat.info_get("version", "")) [[infos_other]] ==== その他の情報 +// TRANSLATION MISSING [source,python] ---- -# WeeChat ホームディレクトリ、例えば: "/home/xxxx/.weechat" -weechat.prnt("", "WeeChat home dir: %s" % weechat.info_get("weechat_dir", "")) +# WeeChat config directory, for example: "/home/user/.config/weechat" +weechat.prnt("", "WeeChat config dir: %s" % weechat.info_get("weechat_config_dir", "")) # キーボードの不使用時間 weechat.prnt("", "Inactivity since %s seconds" % weechat.info_get("inactivity", "")) diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc index 3d6bde8e2..f755f84db 100644 --- a/doc/ja/weechat_user.ja.adoc +++ b/doc/ja/weechat_user.ja.adoc @@ -484,10 +484,10 @@ _/var/lib/systemd/coredump_ and you must use the command `coredumpctl` to read i For more information, see this wiki page: https://wiki.archlinux.org/index.php/Core_dump 例えば、_weechat_ が _/usr/bin/_ にインストールされ、_core_ ファイルが -_/home/xxx/_ にある場合、以下のコマンドで gdb を起動してください: +_/home/user/_ にある場合、以下のコマンドで gdb を起動してください: ---- -gdb /usr/bin/weechat /home/xxx/core +gdb /usr/bin/weechat /home/user/core ---- gdb の中で `bt full` @@ -573,8 +573,8 @@ to upgrade the kernel or to move your WeeChat to another machine: ---- This saves the current state in `*.upgrade` files. You can then either reboot -or move the whole directory `~/.weechat` to another machine, and restart -WeeChat later with this command: +or move the whole WeeChat directories (config, data, cache) to another machine, +and restart WeeChat later with this command: ---- $ weechat --upgrade @@ -607,7 +607,7 @@ WeeChat has an automatic upgrade of configuration files (`*.conf`): Example of warning when an option has been removed: ---- -=!= 警告: /home/xxx/.weechat/sec.conf, 行 15: セクション "crypt" の無効なオプション: passphrase_file = "" +=!= 警告: /home/user/.config/weechat/sec.conf, 行 15: セクション "crypt" の無効なオプション: passphrase_file = "" ---- That means the option `sec.crypt.passphrase_file` has been removed, and you @@ -627,7 +627,7 @@ $ weechat ---- WeeChat の初回起動時にデフォルトのオプション設定を含む設定ファイルが -_~/.weechat_ ディレクトリの中に作成されます +_~/.config/weechat_ ディレクトリの中に作成されます (<<files_and_directories,ファイルとディレクトリ>>を参照してください)。 ==== コマンドラインオプション @@ -658,10 +658,28 @@ include::includes/cmdline_options.ja.adoc[tag=debug] [[files_and_directories]] === ファイルとディレクトリ -デフォルト状態の WeeChat は `~/.weechat` -ディレクトリ内に設定ファイルおよびその他のデータを書き込みます。 + // TRANSLATION MISSING -These files are created with default values the first time you run WeeChat. +[[xdg_directories]] +==== XDG directories + +WeeChat uses XDG directories by default +(according to the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG Base Directory Specification]). + +A single home directory for all files can be forced by CMake option `WEECHAT_HOME`, +the environment variable `WEECHAT_HOME` or the command-line option `-d` / `--dir`. + +When a single WeeChat home directory is not forced, XDG directories are used +and set like this: + +[width="100%",cols="1,2m,5",options="header"] +|=== +| Directory | Default value | Fallback value +| config | $XDG_CONFIG_HOME/weechat | `$HOME/.config/weechat` if `$XDG_CONFIG_HOME` is not defined or empty. +| data | $XDG_DATA_HOME/weechat | `$HOME/.local/share/weechat` if `$XDG_DATA_HOME` is not defined or empty. +| cache | $XDG_CACHE_HOME/weechat | `$HOME/.cache/weechat` if `$XDG_CACHE_HOME` is not defined or empty. +| runtime | $XDG_RUNTIME_DIR/weechat | Same as _cache_ directory if `$XDG_RUNTIME_DIR` is not defined or empty. +|=== + +The configuration files are created with default values the first time you run WeeChat. // TRANSLATION MISSING [[weechat_directories]] @@ -672,29 +690,38 @@ The WeeChat directories are: [width="100%",cols="1m,3",options="header"] |=== -| パス/ファイル | 説明 -| ~/.weechat/ | WeeChat ホームディレクトリ (変更するには <<running_weechat,WeeChat の起動>>を参照してください) -| logs/ | ログファイル (バッファごとに 1 つのファイル) -| python/ | Python スクリプト -| autoload/ | 起動時に自動ロードされる Python スクリプト ^(1)^ -| perl/ | Perl スクリプト -| autoload/ | 起動時に自動ロードされる Perl スクリプト ^(1)^ -| ruby/ | Ruby スクリプト -| autoload/ | 起動時に自動ロードされる Ruby スクリプト ^(1)^ -| lua/ | Lua スクリプト -| autoload/ | 起動時に自動ロードされる Lua スクリプト ^(1)^ -| tcl/ | Tcl スクリプト -| autoload/ | 起動時に自動ロードされる Tcl スクリプト ^(1)^ -| guile/ | Guile スクリプト -| autoload/ | 起動時に自動ロードされる Guile スクリプト ^(1)^ -| javascript/ | JavaScript スクリプト -| autoload/ | 起動時に自動ロードされる JavaScript スクリプト ^(1)^ -| php/ | PHP スクリプト -| autoload/ | 起動時に自動ロードされる PHP スクリプト ^(1)^ +// TRANSLATION MISSING +| Path ^(1)^ | 説明 +// TRANSLATION MISSING +| ~/.config/weechat/ | WeeChat configuration files: `*.conf`, certificates, etc. +// TRANSLATION MISSING +| ~/.local/share/weechat/ | WeeChat data files: logs, scripts, scripts data, xfer files, etc. +| logs/ | ログファイル (バッファごとに 1 つのファイル) +| python/ | Python スクリプト +| autoload/ | 起動時に自動ロードされる Python スクリプト ^(2)^ +| perl/ | Perl スクリプト +| autoload/ | 起動時に自動ロードされる Perl スクリプト ^(2)^ +| ruby/ | Ruby スクリプト +| autoload/ | 起動時に自動ロードされる Ruby スクリプト ^(2)^ +| lua/ | Lua スクリプト +| autoload/ | 起動時に自動ロードされる Lua スクリプト ^(2)^ +| tcl/ | Tcl スクリプト +| autoload/ | 起動時に自動ロードされる Tcl スクリプト ^(2)^ +| guile/ | Guile スクリプト +| autoload/ | 起動時に自動ロードされる Guile スクリプト ^(2)^ +| javascript/ | JavaScript スクリプト +| autoload/ | 起動時に自動ロードされる JavaScript スクリプト ^(2)^ +| php/ | PHP スクリプト +| autoload/ | 起動時に自動ロードされる PHP スクリプト ^(2)^ +// TRANSLATION MISSING +| ~/.cache/weechat/ | WeeChat cache files: scripts cache. +// TRANSLATION MISSING +| /run/user/1000/weechat/ | WeeChat runtime files: FIFO pipe, Relay UNIX sockets. |=== [NOTE] -^(1)^ このディレクトリには親ディレクトリ内にあるスクリプトへのシンボリックリンクのみが含まれることが多いです。 +^(1)^ XDG directories may be different according to your environment variables `XDG_*`. + +^(2)^ このディレクトリには親ディレクトリ内にあるスクリプトへのシンボリックリンクのみが含まれることが多いです。 // TRANSLATION MISSING [[weechat_files]] @@ -2782,7 +2809,9 @@ include::includes/autogen_user_options.ja.adoc[tag=exec_options] 外部から WeeChat を操作するには、FIFO パイプにコマンドやテキストを書き込んでください ("fifo.file.enabled" オプションが有効化されている必要がありますが、デフォルトで有効化されているはずです)。 -FIFO パイプは _~/.weechat/_ の中にあり、デフォルトで _weechat_fifo_ という名前を付けられています。 +// TRANSLATION MISSING +The FIFO pipe is located in WeeChat runtime directory and is called +_weechat_fifo_ by default. FIFO パイプに書き込むコマンド/テキストの文法は以下の例の一つです: @@ -2796,26 +2825,26 @@ FIFO パイプに書き込むコマンド/テキストの文法は以下の例 * IRC サーバ freenode で使うニックネームを "newnick" に変更する: ---- -$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo +$ echo 'irc.server.freenode */nick newnick' >/run/user/1000/weechat/weechat_fifo ---- * IRC チャンネル #weechat に対してテキストを送信: ---- -$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo +$ echo 'irc.freenode.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo ---- * 現在のバッファに対してテキストを送信: ---- -$ echo '*hello!' >~/.weechat/weechat_fifo +$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo ---- * Python スクリプトのアンロードとロードを行う 2 つのコマンドを送信 (複数のコマンドは "\n" で分割してください): ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo +$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo ---- [[fifo_commands]] @@ -3454,7 +3483,7 @@ logger.file.mask 以下のファイルが作成されます: .... -~/.weechat +~/.local/share/weechat └── logs ├── 2010 │ ├── 11 @@ -3483,7 +3512,7 @@ IRC サーバ名を使ったディレクトリに、チャンネル名を使っ 以下のファイルが作成されます: .... -~/.weechat +~/.local/share/weechat └── logs └── irc ├── freenode @@ -3693,12 +3722,14 @@ websocket = new WebSocket("ws://server.com:9000/weechat"); UNIX ドメインソケット上の任意のプロトコルをリッスンできます。例: ---- -/relay add unix.weechat %h/relay_socket +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ---- -こうすることで、クライアントは weechat プロトコルを使って _~/.weechat/relay_socket_ +こうすることで、クライアントは weechat プロトコルを使って _/run/user/1000/weechat/relay_socket_ に接続できます。これは、他のポートをオープンが禁止されている状況下で、リレークライアントの -SSH 転送を許可する際に特に便利です。OpenSSH を使った例: +SSH 転送を許可する際に特に便利です。 + +OpenSSH を使った例: ---- $ ssh -L 9000:.weechat/relay_socket user@hostname diff --git a/doc/pl/includes/cmdline_options.pl.adoc b/doc/pl/includes/cmdline_options.pl.adoc index de8c8fca6..f124174de 100644 --- a/doc/pl/includes/cmdline_options.pl.adoc +++ b/doc/pl/includes/cmdline_options.pl.adoc @@ -14,21 +14,22 @@ (works only with the command *weechat-headless*, not compatible with option "--daemon"). +// TRANSLATION MISSING *-d*, *--dir* _<ścieżka>_:: - Ustawia ścieżkę jako katalog domowy WeeChat (używany dla plików - konfiguracyjnych, logów, wtyczek użytkownika i skryptów), domyślna wartość - to "~/.weechat" (katalog zostanie utworzony jeśli nie istnieje). + Force a single directory for all WeeChat files (directory is created if not found). + Four directories can be given, separated by colons (in this order: config, + data, cache, runtime). Jeśli ta opcja nie zostanie podada, użyta zostanie zawartość zmiennej WEECHAT_HOME (jeśli została ustawiona). *-t*, *--temp-dir*:: Tworzy tymczasowy katalog dla ustawień WeeChat, który jest kasowany po wyłączeniu aplikacji (nie kompatybilne z opcją "-d"). + - Nazwa katalogu jest automatyczne tworzona według wzoru: "weechat_temp_XXXXXX" + Nazwa katalogu jest automatyczne tworzona według wzoru: "weechat_temp_XXXXXX" (gdzie "XXXXXX" jest losowe). Katalog jest tworzony w pierwszym dostępnym miejscu - według tej listy: zmienna środowiskowa "TMPDIR", "/tmp" (może być inaczej na + według tej listy: zmienna środowiskowa "TMPDIR", "/tmp" (może być inaczej na niektórych systemach operacyjnych), zmienna środowiskowa "HOME", obecny katalog. + - Utworony katalog ma uprawnienia 0700 (tylko właściciel może czytać, pisać i + Utworony katalog ma uprawnienia 0700 (tylko właściciel może czytać, pisać i wykonywać). *-h*, *--help*:: diff --git a/doc/pl/includes/man.pl.adoc b/doc/pl/includes/man.pl.adoc index 9cce69657..cf4bbb724 100644 --- a/doc/pl/includes/man.pl.adoc +++ b/doc/pl/includes/man.pl.adoc @@ -18,79 +18,79 @@ numeru potyu po adresie, na przykład: // end::plugin_options[] // tag::files[] -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: główny plik konfiguracyjny WeeChat -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: plik konfiguracyjny wtyczek -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: plik konfiguracyjny z zabezpieczonymi danymi -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: plik konfiguracyjny wtyczki _alias_ -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: plik konfiguracyjny wtyczki _buflist_ -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: plik konfiguracyjny wtyczki _charset_ -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: plik konfiguracyjny wtyczki _exec_ -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: plik konfiguracyjny wtyczki _fifo_ -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: plik konfiguracyjny wtyczki _fset_ -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: plik konfiguracyjny wtyczki _guile_ -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: plik konfiguracyjny wtyczki _irc_ -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: plik konfiguracyjny wtyczki _javascript_ -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: plik konfiguracyjny wtyczki _logger_ -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: plik konfiguracyjny wtyczki _lua_ -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: plik konfiguracyjny wtyczki _perl_ -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: plik konfiguracyjny wtyczki _php_ -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: plik konfiguracyjny wtyczki _python_ -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: plik konfiguracyjny wtyczki _relay_ -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: plik konfiguracyjny wtyczki _ruby_ -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: plik konfiguracyjny wtyczki _script_ -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: plik konfiguracyjny wtyczki _spell_ -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: plik konfiguracyjny wtyczki _tcl_ -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: plik konfiguracyjny wtyczki _trigger_ -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: plik konfiguracyjny wtyczki _xfer_ -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: plik z logami WeeChat // end::files[] diff --git a/doc/pl/weechat_faq.pl.adoc b/doc/pl/weechat_faq.pl.adoc index e25e99302..87f861987 100644 --- a/doc/pl/weechat_faq.pl.adoc +++ b/doc/pl/weechat_faq.pl.adoc @@ -1058,9 +1058,13 @@ w tym dokumencie (zwłaszcza opcji _weechat.network.gnutls_ca_file_). Jeśli to nie pomoże spróuj ręcznie usunąć plik z listą skryptów (z poziomu powłoki): ---- -$ rm ~/.weechat/script/plugins.xml.gz +$ rm ~/.cache/weechat/script/plugins.xml.gz ---- +// TRANSLATION MISSING +[NOTE] +With WeeChat ≤ 3.1, the path should be: _~/.weechat/script/plugins.xml.gz_. + Następnie ponownie zaktualizuj listę sktyptów w WeeChat: ---- @@ -1080,7 +1084,7 @@ have to update manually the file yourself to get updates): * w powłoce, z zainstalowanym programem curl: ---- -$ cd ~/.weechat/script +$ cd ~/.cache/weechat/script $ curl -O https://weechat.org/files/plugins.xml.gz ---- @@ -1196,8 +1200,9 @@ Na przykład: [[sharing_config_files]] === Chcę się podzielić moją konfiguracją WeeChat, które pliki powinienem pokazać, a które nie? -Możesz pokazywać pliki z _~/.weechat/*.conf_ poza plikiem _sec.conf_, który -zawiera Twoje hasla zaszywrowane Twoim kluczem. +// TRANSLATION MISSING +You can share configuration files _*.conf_ except the file _sec.conf_ which +contains your passwords ciphered with your passphrase. Niektóre inne pliki mogą zawierać poufne informacje jak hasła (jeśli nie są przetrzymywane w _sec.conf_ za pomocą komendy `/secure`). diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc index fe542fe53..8d9a9b665 100644 --- a/doc/pl/weechat_scripting.pl.adoc +++ b/doc/pl/weechat_scripting.pl.adoc @@ -342,7 +342,7 @@ Możesz zrobić dowiązanie w katalogu _język/autoload_ jeśli chcesz automatyc Na przykład dla Pythona: ---- -$ cd ~/.weechat/python/autoload +$ cd ~/.local/share/weechat/python/autoload $ ln -s ../skrypt.py ---- @@ -1375,10 +1375,11 @@ weechat.prnt("", "Version %s" % weechat.info_get("version", "")) [[infos_other]] ==== Inne informacje +// TRANSLATION MISSING [source,python] ---- -# katalog domowy WeeChat, na przykład: "/home/xxxx/.weechat" -weechat.prnt("", "Katalog domowy WeeChat: %s" % weechat.info_get("weechat_dir", "")) +# WeeChat config directory, for example: "/home/user/.config/weechat" +weechat.prnt("", "WeeChat config dir: %s" % weechat.info_get("weechat_config_dir", "")) # nieaktywność klawiatury weechat.prnt("", "Nieaktywny od %s sekund" % weechat.info_get("inactivity", "")) diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc index 578bb5f43..1d79767d2 100644 --- a/doc/pl/weechat_user.pl.adoc +++ b/doc/pl/weechat_user.pl.adoc @@ -473,10 +473,10 @@ _/var/lib/systemd/coredump_ and you must use the command `coredumpctl` to read i For more information, see this wiki page: https://wiki.archlinux.org/index.php/Core_dump Na przykład jeśli _weechat_ jest zainstalowany w _/usr/bin/_ i plik _core_ -znajduje się w _/home/xxx/_, uruchom gdb za pomocą tej komendy: +znajduje się w _/home/user/_, uruchom gdb za pomocą tej komendy: ---- -gdb /usr/bin/weechat /home/xxx/core +gdb /usr/bin/weechat /home/user/core ---- Następnie pod gdb użyj komendy `bt full`, aby wyświetlić log. @@ -563,8 +563,8 @@ to upgrade the kernel or to move your WeeChat to another machine: ---- This saves the current state in `*.upgrade` files. You can then either reboot -or move the whole directory `~/.weechat` to another machine, and restart -WeeChat later with this command: +or move the whole WeeChat directories (config, data, cache) to another machine, +and restart WeeChat later with this command: ---- $ weechat --upgrade @@ -597,7 +597,7 @@ WeeChat has an automatic upgrade of configuration files (`*.conf`): Example of warning when an option has been removed: ---- -=!= Ostrzeżenie: /home/xxx/.weechat/sec.conf, linia 15: nieznana opcja dla sekcji "crypt": passphrase_file = "" +=!= Ostrzeżenie: /home/user/.config/weechat/sec.conf, linia 15: nieznana opcja dla sekcji "crypt": passphrase_file = "" ---- That means the option `sec.crypt.passphrase_file` has been removed, and you @@ -617,7 +617,7 @@ $ weechat ---- Podczas pierwszego uruchomienia WeeChat tworzone są domyślne pliki konfiguracyjne -w _~/.weechat_ z domyślnymi opcjami i wartościami +w _~/.config/weechat_ z domyślnymi opcjami i wartościami (zobacz <<files_and_directories,Pliki i foldery>>). ==== Argumenty linii poleceń @@ -648,8 +648,28 @@ Niektóre zmienne śwodowiskowe są używane przez WeeChat o ile zostały zdefin [[files_and_directories]] === Pliki i foldery -WeeChat zapisuje pliki konfiguracyjne i inne rzeczy domyślnie w folderze `~/.weechat`. + -Pliki te są tworzone z domyślnymi wartościami przy pierwszym uruchomieniu WeeChat. +// TRANSLATION MISSING +[[xdg_directories]] +==== XDG directories + +WeeChat uses XDG directories by default +(according to the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG Base Directory Specification]). + +A single home directory for all files can be forced by CMake option `WEECHAT_HOME`, +the environment variable `WEECHAT_HOME` or the command-line option `-d` / `--dir`. + +When a single WeeChat home directory is not forced, XDG directories are used +and set like this: + +[width="100%",cols="1,2m,5",options="header"] +|=== +| Directory | Default value | Fallback value +| config | $XDG_CONFIG_HOME/weechat | `$HOME/.config/weechat` if `$XDG_CONFIG_HOME` is not defined or empty. +| data | $XDG_DATA_HOME/weechat | `$HOME/.local/share/weechat` if `$XDG_DATA_HOME` is not defined or empty. +| cache | $XDG_CACHE_HOME/weechat | `$HOME/.cache/weechat` if `$XDG_CACHE_HOME` is not defined or empty. +| runtime | $XDG_RUNTIME_DIR/weechat | Same as _cache_ directory if `$XDG_RUNTIME_DIR` is not defined or empty. +|=== + +The configuration files are created with default values the first time you run WeeChat. [[weechat_directories]] ==== Katalogi WeeChat @@ -658,29 +678,39 @@ Katalogi używane przez WeeChat to: [width="100%",cols="1m,3",options="header"] |=== -| Ścieżka/plik | Opis -| ~/.weechat/ | Katalog domowy WeeChat (można go zmienić, zobacz <<running_weechat,Uruchamianie WeeChat>>). -| logs/ | Pliki z logami (jeden na bufor). -| python/ | Skrypty pythonowe. -| autoload/ | Skrypty pythonowe automatycznie ładowane przy starcie ^(1)^. -| perl/ | Skrypty perlowe. -| autoload/ | Skrypty perlowe automatycznie ładowane przy starcie ^(1)^. -| ruby/ | Skrypty ruby. -| autoload/ | Skrypty ruby automatycznie ładowane przy starcie ^(1)^. -| lua/ | Skrypty lua. -| autoload/ | Skrypty lua automatycznie ładowane przy starcie ^(1)^. -| tcl/ | Skrypty tcl. -| autoload/ | Skrypty tcl automatycznie ładowane przy starcie ^(1)^. -| guile/ | Skrypty guile. -| autoload/ | skrypry guile automatycznie ładowane przy starcie ^(1)^. -| javascript/ | Skrypty JavaScript. -| autoload/ | Skrypty JavaScript automatycznie ładowane przy starcie ^(1)^. -| php/ | Skrypty PHP. -| autoload/ | Skrypty PHP automatycznie ładowane przy starcie ^(1)^. +// TRANSLATION MISSING +| Path ^(1)^ | Opis +// TRANSLATION MISSING +| ~/.config/weechat/ | WeeChat configuration files: `*.conf`, certificates, etc. +// TRANSLATION MISSING +| ~/.local/share/weechat/ | WeeChat data files: logs, scripts, scripts data, xfer files, etc. +| logs/ | Pliki z logami (jeden na bufor). +| python/ | Skrypty pythonowe. +| autoload/ | Skrypty pythonowe automatycznie ładowane przy starcie ^(2)^. +| perl/ | Skrypty perlowe. +| autoload/ | Skrypty perlowe automatycznie ładowane przy starcie ^(2)^. +| ruby/ | Skrypty ruby. +| autoload/ | Skrypty ruby automatycznie ładowane przy starcie ^(2)^. +| lua/ | Skrypty lua. +| autoload/ | Skrypty lua automatycznie ładowane przy starcie ^(2)^. +| tcl/ | Skrypty tcl. +| autoload/ | Skrypty tcl automatycznie ładowane przy starcie ^(2)^. +| guile/ | Skrypty guile. +| autoload/ | Skrypry guile automatycznie ładowane przy starcie ^(2)^. +| javascript/ | Skrypty JavaScript. +| autoload/ | Skrypty JavaScript automatycznie ładowane przy starcie ^(2)^. +| php/ | Skrypty PHP. +| autoload/ | Skrypty PHP automatycznie ładowane przy starcie ^(2)^. +// TRANSLATION MISSING +| ~/.cache/weechat/ | WeeChat cache files: scripts cache. +// TRANSLATION MISSING +| /run/user/1000/weechat/ | WeeChat runtime files: FIFO pipe, Relay UNIX sockets. |=== +// TRANSLATION MISSING [NOTE] -^(1)^ Ten folder zawiera przewazine linki symboliczne do plików w folderze nadrzędnym. +^(1)^ XDG directories may be different according to your environment variables `XDG_*`. + +^(2)^ Ten folder zawiera przewazine linki symboliczne do plików w folderze nadrzędnym. [[weechat_files]] ==== Pliki WeeChat @@ -2738,7 +2768,9 @@ Możesz zdalnie kontrolować WeeChat, poprzez wysyłanie komend lub tekstu do kolejki FIFO (jeśli opcja "fifo.file.enabled" jest włączona, domyślnie jest włączona). -Kolejka FIFO znajduje się w katalogu _~/.weechat/_ i domyślnie nazywa się _weechat_fifo_. +// TRANSLATION MISSING +The FIFO pipe is located in WeeChat runtime directory and is called +_weechat_fifo_ by default. Składnia dla komend/tekstu przekazywanego do kolejki FIFO wygląda następująco: @@ -2752,26 +2784,26 @@ Kilka przykładów: * Zmiana nicka na serwerze IRC freenode na "newnick": ---- -$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo +$ echo 'irc.server.freenode */nick newnick' >/run/user/1000/weechat/weechat_fifo ---- * Wysłanie wiadomości na kanał IRC #weechat: ---- -$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo +$ echo 'irc.freenode.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo ---- * Wysłanie wiadomości do obecnego bufora: ---- -$ echo '*hello!' >~/.weechat/weechat_fifo +$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo ---- * Wysłanie dwóch komend do wyładowania/przeładowania skryptów Python (należy oddzielić je za pomocą "\n"): ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo +$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo ---- [[fifo_commands]] @@ -3416,7 +3448,7 @@ na przykład: Spowoduje powstanie następującej struktury: .... -~/.weechat +~/.local/share/weechat └── logs ├── 2010 │ ├── 11 @@ -3446,7 +3478,7 @@ każdego kanału: Spowoduje powstanie następującej struktury: .... -~/.weechat +~/.local/share/weechat └── logs └── irc ├── freenode @@ -3652,16 +3684,18 @@ Adres URL musi się zawsze kończyć "/weechat" (dla protokołów _irc_ i _weech [[relay_unix_socket]] ==== Sockety UNIXowe -Używając opcji protokołu "unix" razem z komendą `/relay`, można nasłuchiwać dowolnego +Używając opcji protokołu "unix" razem z komendą `/relay`, można nasłuchiwać dowolnego protokołu za pomocą socketu UNIXowego w podanej ścieżce. Na przykład: ---- -/relay add unix.weechat %h/relay_socket +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ---- Pozwala to na połączenia od klientów za pomocą protokołu weechat do -_~/.weechat/relay_socket_. Jest to przydatne zwłaszcza jeśli chcemy tunelować klienty -przez SSH, w przypadku, kiedy inne porty nie moga być otwierane. Za pomocą OpenSSH: +_/run/user/1000/weechat/relay_socket_. Jest to przydatne zwłaszcza jeśli chcemy +tunelować klienty przez SSH, w przypadku, kiedy inne porty nie moga być otwierane. + +Za pomocą OpenSSH: ---- $ ssh -L 9000:.weechat/relay_socket user@hostname diff --git a/doc/ru/includes/cmdline_options.ru.adoc b/doc/ru/includes/cmdline_options.ru.adoc index be715a69c..ea0431d43 100644 --- a/doc/ru/includes/cmdline_options.ru.adoc +++ b/doc/ru/includes/cmdline_options.ru.adoc @@ -16,11 +16,11 @@ (works only with the command *weechat-headless*, not compatible with option "--daemon"). +// TRANSLATION MISSING *-d*, *--dir* _<путь>_:: - Установить <путь> как домашнюю директорию для WeeChat (используется для - конфигурационных файлов, логов, пользовательских плагинов и скриптов). - Значение по-умолчанию: "~/.weechat" (замечание: директория будет создана, - если WeeChat не найдет ее). + Force a single directory for all WeeChat files (directory is created if not found). + Four directories can be given, separated by colons (in this order: config, + data, cache, runtime). Если эта опция не задана, будет использована переменная окружения WEECHAT_HOME (если такая переменная задана). diff --git a/doc/ru/includes/man.ru.adoc b/doc/ru/includes/man.ru.adoc index 968fde569..0e740332f 100644 --- a/doc/ru/includes/man.ru.adoc +++ b/doc/ru/includes/man.ru.adoc @@ -16,79 +16,79 @@ IPv6-адрес можно заключить в квадратные скобк // end::plugin_options[] // tag::files[] -$HOME/.weechat/weechat.conf:: +$HOME/.config/weechat/weechat.conf:: главный файл конфигурации WeeChat -$HOME/.weechat/plugins.conf:: +$HOME/.config/weechat/plugins.conf:: файл конфигурации плагинов -$HOME/.weechat/sec.conf:: +$HOME/.config/weechat/sec.conf:: файл конфигурации с защищаемыми данными -$HOME/.weechat/alias.conf:: +$HOME/.config/weechat/alias.conf:: файл конфигурации для плагина _alias_ -$HOME/.weechat/buflist.conf:: +$HOME/.config/weechat/buflist.conf:: файл конфигурации для плагина _buflist_ -$HOME/.weechat/charset.conf:: +$HOME/.config/weechat/charset.conf:: файл конфигурации для плагина _charset_ -$HOME/.weechat/exec.conf:: +$HOME/.config/weechat/exec.conf:: файл конфигурации для плагина _exec_ -$HOME/.weechat/fifo.conf:: +$HOME/.config/weechat/fifo.conf:: файл конфигурации для плагина _fifo_ -$HOME/.weechat/fset.conf:: +$HOME/.config/weechat/fset.conf:: файл конфигурации для плагина _fset_ -$HOME/.weechat/guile.conf:: +$HOME/.config/weechat/guile.conf:: файл конфигурации для плагина _guile_ -$HOME/.weechat/irc.conf:: +$HOME/.config/weechat/irc.conf:: файл конфигурации для плагина _irc_ -$HOME/.weechat/javascript.conf:: +$HOME/.config/weechat/javascript.conf:: файл конфигурации для плагина _javascript_ -$HOME/.weechat/logger.conf:: +$HOME/.config/weechat/logger.conf:: файл конфигурации для плагина _logger_ -$HOME/.weechat/lua.conf:: +$HOME/.config/weechat/lua.conf:: файл конфигурации для плагина _lua_ -$HOME/.weechat/perl.conf:: +$HOME/.config/weechat/perl.conf:: файл конфигурации для плагина _perl_ -$HOME/.weechat/php.conf:: +$HOME/.config/weechat/php.conf:: файл конфигурации для плагина _php_ -$HOME/.weechat/python.conf:: +$HOME/.config/weechat/python.conf:: файл конфигурации для плагина _python_ -$HOME/.weechat/relay.conf:: +$HOME/.config/weechat/relay.conf:: файл конфигурации для плагина _relay_ -$HOME/.weechat/ruby.conf:: +$HOME/.config/weechat/ruby.conf:: файл конфигурации для плагина _ruby_ -$HOME/.weechat/script.conf:: +$HOME/.config/weechat/script.conf:: файл конфигурации для плагина _script_ -$HOME/.weechat/spell.conf:: +$HOME/.config/weechat/spell.conf:: файл конфигурации для плагина _spell_ -$HOME/.weechat/tcl.conf:: +$HOME/.config/weechat/tcl.conf:: файл конфигурации для плагина _tcl_ -$HOME/.weechat/trigger.conf:: +$HOME/.config/weechat/trigger.conf:: файл конфигурации для плагина _trigger_ -$HOME/.weechat/xfer.conf:: +$HOME/.config/weechat/xfer.conf:: файл конфигурации для плагина _xref_ -$HOME/.weechat/weechat.log:: +$HOME/.local/share/weechat/weechat.log:: лог-файл WeeChat // end::files[] diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 48fdd7ef2..511b9da77 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -738,7 +738,7 @@ string_match_list (const char *string, const char **masks, int case_sensitive) /* * Expands home in a path. * - * Example: "~/file.txt" => "/home/xxx/file.txt" + * Example: "~/file.txt" => "/home/user/file.txt" * * Note: result must be freed after use. */ |