mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 19:53:13 +02:00
core: split WeeChat home in 4 directories, use XDG directories by default (issue #1285)
The 4 directories (which can be the same): - config: configuration files, certificates - data: log/upgrade files, local plugins, scripts, xfer files - cache: script repository, scripts downloaded (temporary location) - runtime: FIFO pipe, relay UNIX sockets
This commit is contained in:
@@ -102,7 +102,8 @@ fifo_command_init ()
|
||||
"\n"
|
||||
"FIFO pipe is used as remote control of WeeChat: you can send "
|
||||
"commands or text to the FIFO pipe from your shell.\n"
|
||||
"By default the FIFO pipe is in ~/.weechat/weechat_fifo\n"
|
||||
"By default the FIFO pipe is called weechat_fifo and saved in the "
|
||||
"WeeChat runtime directory (see /debug dirs).\n"
|
||||
"\n"
|
||||
"The expected format is one of:\n"
|
||||
" plugin.buffer *text or command here\n"
|
||||
@@ -110,7 +111,7 @@ fifo_command_init ()
|
||||
"\n"
|
||||
"For example to change your freenode nick:\n"
|
||||
" echo 'irc.server.freenode */nick newnick' "
|
||||
">~/.weechat/weechat_fifo\n"
|
||||
">/run/user/1000/weechat/weechat_fifo\n"
|
||||
"\n"
|
||||
"Please read the user's guide for more info and examples.\n"
|
||||
"\n"
|
||||
|
||||
+12
-2
@@ -65,16 +65,26 @@ void
|
||||
fifo_create ()
|
||||
{
|
||||
struct stat st;
|
||||
struct t_hashtable *options;
|
||||
|
||||
if (!weechat_config_boolean (fifo_config_file_enabled))
|
||||
return;
|
||||
|
||||
if (!fifo_filename)
|
||||
{
|
||||
/* replace %h and "~", evaluate path */
|
||||
/* evaluate path */
|
||||
options = weechat_hashtable_new (
|
||||
32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL, NULL);
|
||||
if (options)
|
||||
weechat_hashtable_set (options, "directory", "runtime");
|
||||
fifo_filename = weechat_string_eval_path_home (
|
||||
weechat_config_string (fifo_config_file_path),
|
||||
NULL, NULL, NULL);
|
||||
NULL, NULL, options);
|
||||
if (options)
|
||||
weechat_hashtable_free (options);
|
||||
}
|
||||
|
||||
if (!fifo_filename)
|
||||
|
||||
Reference in New Issue
Block a user