22
22
#
23
23
# Script inspirated and tested by LaoLang_cool
24
24
#
25
+ # 1.0 : add compatibility with WeeChat >= 3.2 (XDG directories)
25
26
# 0.9 : add eval_expression() for format options
26
27
# 0.8 : escape special characters in hotlist (arza)
27
28
# 0.7 : using %h for weechat-dir instead of hardcoded path in script (flashcode)
36
37
37
38
use strict;
38
39
my $SCRIPT_NAME = " hotlist2extern" ;
39
- my $SCRIPT_VERSION = " 0.9 " ;
40
+ my $SCRIPT_VERSION = " 1.0 " ;
40
41
my $SCRIPT_DESC = " Give hotlist to an external file/program/screen title" ;
41
42
my $SCRIPT_AUTHOR = " Nils Görs <weechatter\@ arcor.de>" ;
42
43
@@ -206,7 +207,7 @@ sub toggle_config_by_set{
206
207
" " ,
207
208
" This script allows you to export the hotlist to a file or screen title.\n " .
208
209
" use the following intern variables for the hotlist_format:\n " .
209
- " %h = weechat-dir (~/.weechat) , better use \$ {info:weechat_dir}\n " .
210
+ " %h = weechat_data_dir , better use \$ {weechat_data_dir} (or \$ { info:weechat_dir} with WeeChat < 3.2) \n " .
210
211
" %H = replaces with highlight_char, if a highlight message was received. For example: *\n " .
211
212
" %N = replaces with buffer number: 1 2 3 ....\n " .
212
213
" %S = replaces with short name of channel: #weechat\n " .
@@ -228,6 +229,7 @@ sub toggle_config_by_set{
228
229
229
230
230
231
init_config(); # /set
231
- $weechat_dir = weechat::info_get(" weechat_dir" , " " );
232
+ $weechat_dir = weechat::info_get(" weechat_data_dir" , " " );
233
+ $weechat_dir = weechat::info_get(" weechat_dir" , " " ) if (!$weechat_dir );
232
234
weechat::hook_signal(" hotlist_changed" , " hotlist_changed" , " " );
233
235
weechat::hook_config( " plugins.var.perl.$SCRIPT_NAME .*" , " toggle_config_by_set" , " " );
0 commit comments