summaryrefslogtreecommitdiff
path: root/doc/en/weechat_faq.en.adoc
blob: cbd1902391f7c076c0189f167c387639584ab5b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
= WeeChat FAQ (Frequently Asked Questions)
:author: Sébastien Helleu
:email: flashcode@flashtux.org
:lang: en

[[general]]
== General

[[weechat_name]]
=== Where does the name "WeeChat" come from?

"Wee" is a recursive acronym and stands for "Wee Enhanced Environment".
So complete name is "Wee Enhanced Environment for Chat".

"Wee" also means "very small" (and yes, there is other meaning, but it does not
apply to WeeChat!).

[[why_choose_weechat]]
=== Why choose WeeChat? X-Chat and Irssi are so good...

Because WeeChat is very light and brings innovating features.

More info on the WeeChat
https://weechat.org/about/features/[features page ^↗^^].

[[compilation_install]]
== Compilation / install

[[gui]]
=== I've heard about many GUIs for WeeChat. How can I compile/use them?

Some remote GUIs are available, see the
https://weechat.org/about/interfaces/[remote interfaces page ^↗^^].

[[compile_git]]
=== I can't compile WeeChat after cloning git repository, why?

WeeChat must be compiled with CMake.

Please follow link:weechat_user.en.html#source_package[build instructions ^↗^^]
and ensure all required dependencies are installed.

If you still have issues, please report them to the developers.

[[compile_macos]]
=== How can I install WeeChat on macOS?

It is recommended to use https://brew.sh/[Homebrew ^↗^^],
you can get help with:

----
brew info weechat
----

You can install WeeChat with this command:

----
brew install weechat
----

[[lost]]
=== I've launched WeeChat, but I'm lost, what can I do?

For help you can type `/help`. For help about a command, type `/help command`.
link:weechat_user.en.html#key_bindings[Keys ^↗^^] and
link:weechat_user.en.html#commands_and_options[commands ^↗^^]
are listed in documentation.

It's recommended for new users to read the
link:weechat_quickstart.en.html[Quickstart guide ^↗^^].

[[display]]
== Display

[[charset]]
=== I don't see some chars with accents, what can I do?

It's a common issue with a variety of causes, please read carefully and check
*ALL* solutions below:

* Check that weechat is linked to libncursesw (warning: needed on most
  distributions but not all): `ldd /path/to/weechat`.
* Check that the "charset" plugin is loaded with `/plugin` command (if it is
  not, then you probably need the "weechat-plugins" package).
* Check the output of command `/charset` (on core buffer). You should see
  _ISO-XXXXXX_ or _UTF-8_ for terminal charset. If you see _ANSI_X3.4-1968_ or
  other values, your locale is probably wrong. +
  To fix your locale, check the installed locales with `locale -a` and set
  an appropriate value in $LANG, for example: `+export LANG=en_US.UTF-8+`.
* Setup global decode value, for example:
  `/set charset.default.decode "ISO-8859-15"`.
* If you are using UTF-8 locale:
** Check that your terminal is UTF-8 ready (terminal recommended for UTF-8 is
   rxvt-unicode).
** If you are using screen, check that it is run with UTF-8 mode
   ("`defutf8 on`" in ~/.screenrc or `screen -U` to run screen).
* Check that option
  link:weechat_user.en.html#option_weechat.look.eat_newline_glitch[_weechat.look.eat_newline_glitch_ ^↗^^]
  is off (this option may cause display bugs).

[NOTE]
UTF-8 locale is recommended for WeeChat. If you're using ISO or other
locale, please check that *all* your settings (terminal, screen, ..) are ISO
and *not* UTF-8.

[[unicode_chars]]
=== Some unicode chars are displayed in terminal but not in WeeChat, why?

This may be caused by a libc bug in function _wcwidth_, which should be fixed
in glibc 2.22 (maybe not yet available in your distribution).

There is a workaround to use the fixed _wcwidth_ function:
https://blog.nytsoi.net/2015/05/04/emoji-support-for-weechat[https://blog.nytsoi.net/2015/05/04/emoji-support-for-weechat ^↗^^]

See this https://github.com/weechat/weechat/issues/79[bug report ^↗^^]
for more information.

[[bars_background]]
=== Bars like title and status are not filled, background color stops after text, why?

This may be caused by a bad value of the TERM variable in your shell (look at
the output of `echo $TERM` in your terminal).

Depending on where you launch WeeChat, you should have:

* If WeeChat runs locally or on a remote machine without screen nor tmux, it
  depends on the terminal used: _xterm_, _xterm-256color_, _rxvt-unicode_,
  _rxvt-256color_, etc.
* If WeeChat runs under screen, you should have _screen_ or _screen-256color_.
* If WeeChat runs under tmux, you should have _tmux_, _tmux-256color_,
  _screen_ or _screen-256color_.

If needed, fix your TERM variable: `export TERM="xxx"`.

[[screen_weird_chars]]
=== When I'm using weechat under screen/tmux, I have weird random chars, how do I fix that?

This may be caused by bad value of the TERM variable in your shell (look at
output of `echo $TERM` in your terminal, *outside screen/tmux*). +
For example, _xterm-color_ may display such weird chars, you can use _xterm_
which is OK (like many other values). +
If needed, fix your TERM variable: `export TERM="xxx"`.

If you are using gnome-terminal, check that the option
"Ambiguous-width characters" in menu Preferences/Profile/Compatibility
is set to `narrow`.

[[macos_display_broken]]
=== I compiled WeeChat under macOS, and I see "(null)" everywhere on screen, what's wrong?

If you compiled ncursesw yourself, try to use standard ncurses (that comes with
system).

Moreover, under macOS, it is recommended to install WeeChat with Homebrew
package manager.

[[buffer_vs_window]]
=== I've heard about "buffers" and "windows", what's the difference?

A _buffer_ is composed by a number, a name, lines displayed (and some other
data).

A _window_ is a screen area which displays a buffer. It is possible to split
your screen into many windows.

Each window displays one buffer, or a set of merged buffers.
A buffer can be hidden (not displayed by a window) or displayed by one or more
windows.

[[buffers_list]]
=== How to display the buffers list on the left side?

The plugin link:weechat_user.en.html#buflist[buflist ^↗^^]
is loaded and enabled by default.

To limit size of bar:

----
/set weechat.bar.buflist.size_max 15
----

To move bar to bottom:

----
/set weechat.bar.buflist.position bottom
----

To scroll the bar: if mouse is enabled (key: kbd:[Alt+m]), you can scroll the
bar with your mouse wheel.

Default keys to scroll _buflist_ bar are kbd:[F1] (or kbd:[Ctrl+F1]), kbd:[F2]
(or kbd:[Ctrl+F2]), kbd:[Alt+F1] and kbd:[Alt+F2].

[[customize_buflist]]
=== How can I customize the list of buffers list, like the color of the active buffer?

You can browse all buflist options with the command:

----
/fset buflist
----

The background of the active buffer is blue by default, you can change it
like this, for example to `red`:

----
/set buflist.format.buffer_current "${color:,red}${format_buffer}"
----

[NOTE]
There's a comma before the color name "red" because it is used as the background,
not the text color. +
You can also use any numeric color instead of `red`,
like `237` for dark gray.

The buflist plugin provides lot of options that you can customize, please read
the help on each option.

There's also a https://github.com/weechat/weechat/wiki/buflist[wiki page ^↗^^]
with examples of advanced buflist configuration.

[[customize_prefix]]
=== How can I reduce length of nicks or remove nick alignment in chat area?

To reduce max length of nicks in chat area:

----
/set weechat.look.prefix_align_max 15
----

To remove nick alignment:

----
/set weechat.look.prefix_align none
----

[[status_hotlist]]
=== What does the [H: 3(1,8), 2(4)] in status bar mean?

This is called the "hotlist", a list of buffers with the number of unread
messages, by order: highlights, private messages, messages, other messages
(like join/part). +
The number of "unread message" is the number of new messages displayed/received
since you visited the buffer.

In the example `[H: 3(1,8), 2(4)]`, there are:

* 1 highlight and 8 unread messages on buffer #3,
* 4 unread messages on buffer #2.

The color of the buffer/counter depends on the type of message, default colors
are:

* highlight: `lightmagenta` / `magenta`
* private message: `lightgreen` / `green`
* message: `yellow` / `brown`
* other message: `default` / `default` (color of text in terminal)

These colors can be changed with the options __weechat.color.status_data_*__
(buffers) and __weechat.color.status_count_*__ (counters). +
Other hotlist options can be changed with the options __weechat.look.hotlist_*__.

See link:weechat_user.en.html#screen_layout[User's guide / Screen layout ^↗^^]
for more info about the hotlist.

[[input_bar_size]]
=== How to use command line with more than one line?

The option _size_ in input bar can be set to a value higher than 1 (for fixed
size, default size is 1) or 0 for dynamic size, and then option _size_max_ will
set the max size (0 = no limit).

Example with dynamic size:

----
/set weechat.bar.input.size 0
----

Max size of 2:

----
/set weechat.bar.input.size_max 2
----

[[one_input_root_bar]]
=== Is it possible to display only one input bar for all windows (after split)?

Yes, you will have to create a bar with type "root" (with an item to know in
which window you are), then delete current input bar.

For example:

----
/bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text
/bar del input
----

If ever you are not satisfied with that, just delete new bar, WeeChat will
automatically create default bar "input" if item "input_text" is not used in
any bar:

----
/bar del rootinput
----

[[terminal_copy_paste]]
=== How can I copy/paste text without pasting nicklist?

You can use the bare display (default key: kbd:[Alt+l] (`L`)), which shows
just the contents of the currently selected window, without any formatting.

You can use a terminal with rectangular selection (like rxvt-unicode,
konsole, gnome-terminal, etc.). Key is usually kbd:[Ctrl] + kbd:[Alt] + mouse
selection.

Another solution is to move nicklist to top or bottom, for example:

----
/set weechat.bar.nicklist.position top
----

[[urls]]
=== How can I click on long URLs (more than one line)?

You can use the bare display (default key: kbd:[Alt+l] (`L`)).

To make opening URLs easier, you can:

* move nicklist to top:

----
/set weechat.bar.nicklist.position top
----

* disable alignment for multiline words:

----
/set weechat.look.align_multiline_words off
----

* or for all wrapped lines:

----
/set weechat.look.align_end_of_lines time
----

You can enable option "eat_newline_glitch", so that new line char is not added
at the end of each line displayed (it will not break URL selection):

----
/set weechat.look.eat_newline_glitch on
----

[IMPORTANT]
This option may cause display bugs. If you experience such problem, you must
turn off this option.

Other solution is to use a script:

----
/script search url
----

[[change_locale_without_quit]]
=== I want to change the language used by WeeChat for messages, but without exiting WeeChat, is it possible?

Sure it is possible:

----
/set env LANG en_US.UTF-8
/upgrade
----

[[timezone]]
=== How can I change the timezone?

There is no option in WeeChat to change the timezone, the environment variable
`TZ` must be set to the appropriate value.

In your shell initialization file or on command line, before starting WeeChat:

----
export TZ=America/New_York
----

In WeeChat, the new value is immediately used:

----
/set env TZ America/New_York
----

[[use_256_colors]]
=== How can I use 256 colors in WeeChat?

First check that your _TERM_ environment variable is correct, recommended values
are:

* under screen: _screen-256color_
* under tmux: _screen-256color_ or _tmux-256color_
* outside screen/tmux: _xterm-256color_, _rxvt-256color_, _putty-256color_, ...

[NOTE]
You may have to install package "ncurses-term" to use these values in _TERM_
variable.

If you are using screen, you can add this line to your _~/.screenrc_:

----
term screen-256color
----

If your _TERM_ variable has a wrong value and that WeeChat is already running,
you can change it with these two commands:

----
/set env TERM screen-256color
/upgrade
----

You can use any color number in options (optional: you can add color aliases
with command `/color`).

Please read the link:weechat_user.en.html#colors[User's guide / Colors ^↗^^]
for more information about colors management.

[[search_text]]
=== How can I search text in buffer (like /lastlog in irssi)?

The default key is kbd:[Ctrl+r] (command is: `+/input search_text_here+`).
And jump to highlights: kbd:[Alt+p] / kbd:[Alt+n].

See link:weechat_user.en.html#key_bindings[User's guide / Key bindings ^↗^^]
for more info about this feature.

[[terminal_focus]]
=== How can I execute commands when terminal gets/loses focus?

You must enable the focus events with a special code sent to terminal.

*Important*:

* You must use a modern xterm-compatible terminal.
* Additionally, it seems to be important that your value of the TERM variable
  equals to _xterm_ or _xterm-256color_.
* If you use tmux, you must additionally enable focus events by adding
  `set -g focus-events on` to your _.tmux.conf_ file.
* This does *not* work under screen.

To send the code when WeeChat is starting:

----
/set weechat.startup.command_after_plugins "/print -stdout \033[?1004h\n"
----

And then you bind two keys for the focus (replace the `/print` commands by the
commands of your choice):

----
/key bind meta-[I /print -core focus
/key bind meta-[O /print -core unfocus
----

For example to mark buffers as read when the terminal loses the focus:

----
/key bind meta-[O /allbuf /buffer set unread
----

[[screen_paste]]
=== When WeeChat is running in screen, pasting text in another screen window adds ~0 and ~1 around text, why?

This is caused by the bracketed paste option which is enabled by default, and
not properly handled by screen in other windows.

You can just disable bracketed paste mode:

----
/set weechat.look.paste_bracketed off
----

[[small_terminal]]
=== How can I customize display for very small terminal size (like 80x25), to not waste space?

You can remove side bars (buflist and nicklist), change time format to display
only hours and minutes, disable alignment of messages and set a char for nick
prefix/suffix:

----
/set buflist.look.enabled off
/bar hide nicklist
/set weechat.look.buffer_time_format "%H:%M"
/set weechat.look.prefix_align none
/set weechat.look.align_end_of_lines prefix
/set weechat.look.nick_suffix ">"
/set weechat.look.nick_prefix "<"
----

Terminal 80x25, with default configuration:

....
┌────────────────────────────────────────────────────────────────────────────────┐
│1.local     │Welcome on WeeChat channel!                                        │
│  weechat   │16:27:16        --> | FlashCode (~flashcode@localhost)  │@FlashCode│
│2.  #weechat│                    | has joined #weechat               │ bob      │
│            │16:27:16         -- | Mode #weechat [+nt] by hades.arpa │          │
│            │16:27:16         -- | Channel #weechat: 1 nick (1 op, 0 │          │
│            │                    | voices, 0 normals)                │          │
│            │16:27:18         -- | Channel created on Sun, 22 Mar    │          │
│            │                    | 2020 16:27:16                     │          │
│            │17:02:28        --> | bob (~bob_user@localhost) has     │          │
│            │                    | joined #weechat                   │          │
│            │17:03:12 @FlashCode | hi bob, you're the first user     │          │
│            │                    | here, welcome on the WeeChat      │          │
│            │                    | support channel!                  │          │
│            │17:03:33        bob | hi FlashCode                      │          │
│            │                                                        │          │
│            │                                                        │          │
│            │                                                        │          │
│            │                                                        │          │
│            │                                                        │          │
│            │                                                        │          │
│            │                                                        │          │
│            │                                                        │          │
│            │                                                        │          │
│            │[17:04] [2] [irc/local] 2:#weechat(+nt){2}                         │
│            │[@FlashCode(i)] █                                                  │
└────────────────────────────────────────────────────────────────────────────────┘
....

Terminal 80x25, after changes:

....
┌────────────────────────────────────────────────────────────────────────────────┐
│Welcome on WeeChat channel!                                                     │
│16:27 --> FlashCode (~flashcode@localhost) has joined #weechat                  │
│16:27 -- Mode #weechat [+nt] by hades.arpa                                      │
│16:27 -- Channel #weechat: 1 nick (1 op, 0 voices, 0 normals)                   │
│16:27 -- Channel created on Sun, 22 Mar 2020 16:27:16                           │
│17:02 --> bob (~bob_user@localhost) has joined #weechat                         │
│17:03 <@FlashCode> hi bob, you're the first user here, welcome on the WeeChat   │
│      support channel!                                                          │
│17:03 <bob> hi FlashCode                                                        │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│                                                                                │
│[17:04] [2] [irc/local] 2:#weechat(+nt){2}                                      │
│[@FlashCode(i)] █                                                               │
└────────────────────────────────────────────────────────────────────────────────┘
....

[[key_bindings]]
== Key bindings

[[meta_keys]]
=== Some meta keys (alt + key) are not working, why?

If you're using some terminals like xterm or uxterm, some meta keys do not
work by default. You can add a line in file _~/.Xresources_:

* For xterm:
----
XTerm*metaSendsEscape: true
----
* For uxterm:
----
UXTerm*metaSendsEscape: true
----

And then reload resources (`xrdb -override ~/.Xresources`) or restart X.

If you are using the macOS Terminal app, enable the option
"Use option as meta key" in menu Settings/Keyboard after which you can use the
kbd:[Option] key as meta key.

[[customize_key_bindings]]
=== How can I customize key bindings?

Key bindings are customizable with `/key` command.

Default key kbd:[Alt+k] lets you grab key code and insert it in command line.

[[jump_to_buffer_11_or_higher]]
=== What is the key to jump to buffer 11 (or higher number)?

The key is kbd:[Alt+j] and then 2 digits, for example kbd:[Alt+j], kbd:[1],
kbd:[1] to jump to buffer 11.

You can bind a key, for example:

----
/key bind meta-q /buffer *11
----

List of default keys is in
link:weechat_user.en.html#key_bindings[User's guide / Key bindings ^↗^^].

To jump to buffers with number ≥ 100, you could define a trigger and then use
commands like `/123` to jump to buffer #123:

----
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
----

For an easy jump to buffers, you can also install the _go.py_ script:

----
/script install go.py
----

[[global_history]]
=== How to use global history (instead of buffer history) with up and down keys?

You can bind the up and down keys on global history (default keys for global
history are kbd:[Ctrl+↑] and kbd:[Ctrl+↓]).

Example:

----
/key bind up /input history_global_previous
/key bind down /input history_global_next
----

With WeeChat ≤ 3.8, you must use the raw key code (press kbd:[Alt+k] then key
to display its code):

----
/key bind meta2-A /input history_global_previous
/key bind meta2-B /input history_global_next
----

[[mouse]]
== Mouse

[[mouse_not_working]]
=== Mouse is not working at all, what can I do?

First try to enable mouse:

----
/mouse enable
----

If mouse is still not working, check the TERM variable in your shell (look at
output of `echo $TERM` in your terminal).
According to terminfo used, mouse may not be supported.

You can test mouse support in terminal:

----
$ printf '\033[?1002h'
----

And then click on first char of terminal (upper left). You should see " !!#!!".

To disable mouse in terminal:

----
$ printf '\033[?1002l'
----

[[mouse_coords]]
=== Mouse does nothing for X or Y greater than 94 (or 222), why?

Some terminals are sending only ISO chars for mouse coordinates, so it does not
work for X/Y greater than 94 (or 222).

You should use a terminal that supports UTF-8 coordinates for mouse, like
rxvt-unicode.

[[mouse_select_paste]]
=== How can I select or paste text in terminal when mouse is enabled in WeeChat?

When mouse is enabled in WeeChat, you can use kbd:[Shift] modifier to select or
click in terminal, as if the mouse was disabled (on some terminals like iTerm,
you have to use kbd:[Alt] instead of kbd:[Shift]).

[[irc]]
== IRC

[[irc_tls_connection]]
=== I have some problems when connecting to a server using TLS, what can I do?

If you are using macOS, you must install `openssl` from Homebrew.
A CA file will be bootstrapped using certificates from the system keychain.

If you see errors about gnutls handshake, you can try to use a smaller
Diffie-Hellman key (default is 2048):

----
/set irc.server.example.tls_dhkey_size 1024
----

If you see errors about certificate, you can disable "tls_verify" (be careful,
connection will be less secure by doing that):

----
/set irc.server.example.tls_verify off
----

If the server has an invalid certificate and you know what the certificate
should be, you can specify the fingerprint (SHA-512, SHA-256 or SHA-1):

----
/set irc.server.example.tls_fingerprint 0c06e399d3c3597511dc8550848bfd2a502f0ce19883b728b73f6b7e8604243b
----

[[irc_tls_handshake_error]]
=== When connecting to server with TLS, I only see the error "TLS handshake failed", what can I do?

You can try a different priority string, replace "xxx" by your server name:

----
/set irc.server.xxx.tls_priorities "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT"
----

[[irc_tls_libera]]
=== How can I connect to libera server using TLS?

Check that you have certificates installed on your system, this is commonly
provided by the package "ca-certificates".

Setup server port, TLS, then connect:

----
/set irc.server.libera.addresses "irc.libera.chat/6697"
/set irc.server.libera.tls on
/connect libera
----

[[irc_oauth]]
=== How to connect to a server that requires "oauth"?

Some servers like _twitch_ require oauth to connect.

The oauth is simply a password with the value "oauth:XXXX".

You can add such server and connect with following commands (replace name
and address by appropriate values):

----
/server add name irc.server.org -password=oauth:XXXX
/connect name
----

[[irc_sasl]]
=== How can I be identified before joining channels?

If the server supports SASL, you should use that instead of sending the
command for nickserv authentication, for example:

----
/set irc.server.libera.sasl_username "mynick"
/set irc.server.libera.sasl_password "xxxxxxx"
----

If the server does not support SASL, you can add a delay (between command and
join of channels):

----
/set irc.server.libera.command_delay 5
----

[[edit_autojoin]]
=== How can I add/remove channels from autojoin option?

With WeeChat ≥ 3.5, you can automatically record the channels you manually
join and part in the "autojoin" server option.

For all servers:

----
/set irc.server_default.autojoin_dynamic on
----

For a single server:

----
/set irc.server.libera.autojoin_dynamic on
----

You can also add the current channel in the "autojoin" server option using the
`/autojoin` command:

----
/autojoin add
----

Or another channel:

----
/autojoin add #test
----

There are also scripts:

----
/script search autojoin
----

[[ignore_vs_filter]]
=== What is the difference between the /ignore and /filter commands?

The `/ignore` command is an IRC command, so it applies only for IRC buffers
(servers and channels).
It lets you ignore some nicks or hostnames of users for a server or channel
(command will not apply on content of messages).
Matching messages are deleted by IRC plugin before display (so you'll
never see them, and can't be recovered by removing the ignore).

The `/filter` command is a WeeChat core command, so it applies to any buffer.
It lets you filter some lines in buffers with tags or regular expression for
prefix and content of line.
Filtered lines are only hidden, not deleted, and you can see them if you
disable filters (by default, the key kbd:[Alt+=] toggles filters).

[[filter_irc_join_part_quit]]
=== How can I filter join/part/quit and other annoying messages on IRC channels?

See link:weechat_user.en.html#irc_smart_filter[User's guide / IRC smart filter ^↗^^].

[[filter_irc_join_channel_messages]]
=== How can I filter some messages displayed when I join an IRC channel?

You can choose which messages are displayed when joining a channel with the
option _irc.look.display_join_message_ (see `+/help irc.look.display_join_message+`
for more info).

To hide messages (but keep them in buffer), you can filter them using the tag
(for example _irc_329_ for channel creation date). See `/help filter` for help
with filters.

[[filter_voice_messages]]
=== How can I filter voice messages (eg on Bitlbee server)?

It's not easy to filter voice messages, because voice mode can be set with other
modes in same IRC message.

If you want to do that, it's probably because Bitlbee is using voice to show
away users, and you are flooded with voice messages. Therefore, you can change
that and let WeeChat use a special color for away nicks in nicklist.

For Bitlbee ≥ 3, issue this on control channel _&bitlbee_:

----
channel set show_users online,away
----

For older version of Bitlbee, issue this on control channel _&bitlbee_:

----
set away_devoice false
----

For checking away nicks in WeeChat, see question about
<<color_away_nicks,away nicks>>.

If you really want to filter voice messages, you can use this command, but this
is not perfect (will work only if first mode changed is voice):

----
/filter add hidevoices * irc_mode (\+|\-)v
----

[[color_away_nicks]]
=== How can I see away nicks in nicklist?

You have to set option _irc.server_default.away_check_ to a positive value
(minutes between each check of away nicks).

You can set option _irc.server_default.away_check_max_nicks_ to limit away check
on small channels only.

For example, check every 5 minutes for away nicks, for channels with max 25
nicks:

----
/set irc.server_default.away_check 5
/set irc.server_default.away_check_max_nicks 25
----

[[highlight_notification]]
=== How can I be warned when someone highlights me on a channel?

There is a default trigger "beep" which sends a _BEL_ to the terminal on
a highlight or private message. Thus you can configure your terminal
(or multiplexer like screen/tmux) to run a command or play a sound when
a _BEL_ occurs.

Or you can add a command in "beep" trigger:

----
/set trigger.trigger.beep.command "/print -beep;/exec -bg /path/to/command arguments"
----

With an older WeeChat, you can use a script like _beep.pl_ or _launcher.pl_.

For _launcher.pl_, you have to setup a command:

----
/set plugins.var.perl.launcher.signal.weechat_highlight "/path/to/command arguments"
----

Other scripts on this subject:

----
/script search notify
----

[[disable_highlights_for_specific_nicks]]
=== How can I disable highlights for specific nicks?

You can use the
link:weechat_user.en.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^↗^^]
buffer property to set the max hotlist level for some nicks, per buffer,
or per group of buffers (like IRC servers).

To only disable highlights, you'd have to set it to 2.

For the current buffer:

----
/buffer setauto hotlist_max_level_nicks_add joe:2,mike:2
----

For all channels on server "libera":

----
/set weechat.buffer.irc.libera.*.hotlist_max_level_nicks_add joe:2,mike:2
----

[[irc_target_buffer]]
=== How can I change target buffer for commands on merged buffers (like buffer with servers)?

The default key is kbd:[Ctrl+x] (command is: `+/buffer switch+`).

[[plugins_scripts]]
== Plugins / scripts

[[openbsd_plugins]]
=== I'm using OpenBSD and WeeChat does not load any plugins, what's wrong?

Under OpenBSD, plugin filenames end with ".so.0.0" (".so" for Linux).

You must set that up:

----
/set weechat.plugin.extension ".so.0.0"
/plugin autoload
----

[[install_scripts]]
=== How can I install scripts? Are scripts compatible with other IRC clients?

You can use the command `/script` to install and manage scripts (see `/help script`
for help).

Scripts are not compatible with other IRC clients.

[[scripts_update]]
=== The command "/script update" can not read scripts, how to fix that?

First check questions about TLS connection in this FAQ.

If still not working, try to manually delete the scripts file (in your shell):

----
$ rm ~/.cache/weechat/script/plugins.xml.gz
----

[NOTE]
If you are not using the XDG directories, the path could be: _~/.weechat/script/plugins.xml.gz_.

And update scripts again in WeeChat:

----
/script update
----

If you still have an error, then you must disable the automatic update of file
in WeeChat and download the file manually outside WeeChat (that means you'll
have to update manually the file yourself to get updates):

* in WeeChat:

----
/set script.scripts.cache_expire -1
----

* in your shell, with curl installed:

----
$ cd ~/.cache/weechat/script
$ curl -O https://weechat.org/files/plugins.xml.gz
----

If you're running macOS and the downloaded file has a size of 0 bytes,
try to set this variable in your shell initialization file or on command line,
before starting WeeChat:

----
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
----

[[spell_dictionaries]]
=== I installed aspell dictionaries on my system, how can I use them without restarting WeeChat?

You have to reload the spell plugin:

----
/plugin reload spell
----

[[settings]]
== Settings

[[editing_config_files]]
=== Can I edit configuration files (*.conf) by hand?

You can, but this is *NOT* recommended.

Command `/set` in WeeChat is recommended:

* You can complete the name and value of option with kbd:[Tab] key
  (or kbd:[Shift+Tab] for partial completion, useful for the name).
* The value is checked, a message is displayed in case of error.
* The value is used immediately, you don't need to restart anything.

If you still want to edit files by hand, you should be careful:

* If you put an invalid value for an option, WeeChat will display an error
  on load and discard the value (the default value for option will be used).
* If WeeChat is running, you'll have to issue the command `/reload`, and if
  some settings were changed but not saved with `/save`, you will lose them.

[[memory_usage]]
=== How can I tweak WeeChat to consume less memory?

You can try following tips to consume less memory:

* Use the latest stable version (it is supposed to have less memory leaks than
  older versions).
* Do not load some plugins if you don't use them, for example: buflist,
  fifo, logger, perl, python, ruby, lua, tcl, guile, javascript, php, spell,
  xfer (used for DCC). See `/help weechat.plugin.autoload`.
* Load only scripts that you really need.
* Do not load system certificates if TLS is *NOT* used: turn off this option:
  _weechat.network.gnutls_ca_system_.
* Reduce value of option _weechat.history.max_buffer_lines_number_ or set value
  of option _weechat.history.max_buffer_lines_minutes_.
* Reduce value of option _weechat.history.max_commands_.

[[cpu_usage]]
=== How can I tweak WeeChat to use less CPU?

You can follow same tips as for <<memory_usage,memory>>, and these ones:

* Hide "nicklist" bar: `/bar hide nicklist` (key: kbd:[Alt+Shift+N]).
* Disable "buflist": `/buflist disable` (key: kbd:[Alt+Shift+B]).
* Remove display of seconds in status bar time:
  `+/set weechat.look.item_time_format "%H:%M"+` (this is the default value).
* Disable real time check of misspelled words in command line (if you enabled it):
  `+/set spell.check.real_time off+`.
* Set the _TZ_ variable (for example: `export TZ="Europe/Paris"`), to prevent
  frequent access to file _/etc/localtime_.

[[security]]
=== I am paranoid about security, which settings could I change to be even more secure?

Disable IRC part and quit messages:

----
/set irc.server_default.msg_part ""
/set irc.server_default.msg_quit ""
----

Disable answers to all CTCP queries:

----
/set irc.ctcp.clientinfo ""
/set irc.ctcp.source ""
/set irc.ctcp.time ""
/set irc.ctcp.version ""
/set irc.ctcp.ping ""
----

With WeeChat < 4.1.0, other CTCP queries were replied by default and must be
disabled as well:

----
/set irc.ctcp.finger ""
/set irc.ctcp.userinfo ""
----

Unload and disable auto-loading of "xfer" plugin (used for IRC DCC):

----
/plugin unload xfer
/set weechat.plugin.autoload "*,!xfer"
----

Define a passphrase and use secured data wherever you can for sensitive data
like passwords: see `/help secure` and `/help` on options
(if you can use secured data, it is written in the help).
See also link:weechat_user.en.html#secured_data[User's guide / Secured data ^↗^^].

For example:

----
/secure passphrase xxxxxxxxxx
/secure set libera_username username
/secure set libera_password xxxxxxxx
/set irc.server.libera.sasl_username "${sec.data.libera_username}"
/set irc.server.libera.sasl_password "${sec.data.libera_password}"
----

[[sharing_config_files]]
=== I want to share my WeeChat configuration, what files should I share and what should I keep private?

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
stored in _sec.conf_ with the `/secure` command).

See the link:weechat_user.en.html#files_and_directories[User's guide / Files and directories ^↗^^]
for more information about configuration files.

[[development]]
== Development

[[bug_task_patch]]
=== How should I report bugs, ask for new features or send patches?

See https://weechat.org/about/support/[this page ^↗^^].

[[gdb_error_threads]]
=== When I run WeeChat under gdb, there is an error about threads, what can I do?

When you run WeeChat under gdb, you may have this error:

----
$ gdb /path/to/weechat
(gdb) run
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
----

To fix that, you can run gdb with this command (replace path to libpthread and
WeeChat with paths on your system):

----
$ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat
(gdb) run
----

[[supported_os]]
=== What is the list of supported platforms for WeeChat? Will it be ported to other operating systems?

WeeChat runs fine on most Linux/BSD distributions, GNU/Hurd, Mac OS and Windows
(Cygwin and Windows Subsystem for Linux).

We do our best to run on as many platforms as possible. Help is welcome for
some OS' we don't have, to test WeeChat.

[[help_developers]]
=== I want to help WeeChat developers. What can I do?

There are many tasks to do (testing, code, documentation, etc.)

Please contact us via IRC or mail, look at
https://weechat.org/about/support/[support page ^↗^^].

[[donate]]
=== Can I give money or other things to WeeChat developers?

You can give us money to help development.
Details on https://weechat.org/donate/[donation page ^↗^^].