-
Notifications
You must be signed in to change notification settings - Fork 6
/
rxvtperl.3.man.in
1766 lines (1766 loc) · 84.7 KB
/
rxvtperl.3.man.in
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
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "@@RXVT_NAME@@ 3"
.TH @@RXVT_NAME@@ 3 "2008-11-08" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
@@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& # create a file grab_test in $HOME:
\&
\& sub on_sel_grab {
\& warn "you selected ", $_[0]\->selection;
\& ()
\& }
\&
\& # start a @@RXVT_NAME@@ using it:
\&
\& @@RXVT_NAME@@ \-\-perl\-lib $HOME \-pe grab_test
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Every time a terminal object gets created, extension scripts specified via
the \f(CW\*(C`perl\*(C'\fR resource are loaded and associated with it.
.PP
Scripts are compiled in a 'use strict' and 'use utf8' environment, and
thus must be encoded as \s-1UTF\-8\s0.
.PP
Each script will only ever be loaded once, even in @@RXVT_NAME@@d, where
scripts will be shared (but not enabled) for all terminals.
.PP
You can disable the embedded perl interpreter by setting both \*(L"perl-ext\*(R"
and \*(L"perl-ext-common\*(R" resources to the empty string.
.SH "PREPACKAGED EXTENSIONS"
.IX Header "PREPACKAGED EXTENSIONS"
This section describes the extensions delivered with this release. You can
find them in \fI@@RXVT_LIBDIR@@/urxvt/perl/\fR.
.PP
You can activate them like this:
.PP
.Vb 1
\& @@RXVT_NAME@@ \-pe <extensionname>
.Ve
.PP
Or by adding them to the resource for extensions loaded by default:
.PP
.Vb 1
\& URxvt.perl\-ext\-common: default,selection\-autotransform
.Ve
.IP "selection (enabled by default)" 4
.IX Item "selection (enabled by default)"
(More) intelligent selection. This extension tries to be more intelligent
when the user extends selections (double-click and further clicks). Right
now, it tries to select words, urls and complete shell-quoted
arguments, which is very convenient, too, if your \fIls\fR supports
\&\f(CW\*(C`\-\-quoting\-style=shell\*(C'\fR.
.Sp
A double-click usually selects the word under the cursor, further clicks
will enlarge the selection.
.Sp
The selection works by trying to match a number of regexes and displaying
them in increasing order of length. You can add your own regexes by
specifying resources of the form:
.Sp
.Vb 3
\& URxvt.selection.pattern\-0: perl\-regex
\& URxvt.selection.pattern\-1: perl\-regex
\& ...
.Ve
.Sp
The index number (0, 1...) must not have any holes, and each regex must
contain at least one pair of capturing parentheses, which will be used for
the match. For example, the following adds a regex that matches everything
between two vertical bars:
.Sp
.Vb 1
\& URxvt.selection.pattern\-0: \e\e|([^|]+)\e\e|
.Ve
.Sp
Another example: Programs I use often output \*(L"absolute path: \*(R" at the
beginning of a line when they process multiple files. The following
pattern matches the filename (note, there is a single space at the very
end):
.Sp
.Vb 1
\& URxvt.selection.pattern\-0: ^(/[^:]+):\e
.Ve
.Sp
You can look at the source of the selection extension to see more
interesting uses, such as parsing a line from beginning to end.
.Sp
This extension also offers following bindable keyboard commands:
.RS 4
.IP "rot13" 4
.IX Item "rot13"
Rot\-13 the selection when activated. Used via keyboard trigger:
.Sp
.Vb 1
\& URxvt.keysym.C\-M\-r: perl:selection:rot13
.Ve
.RE
.RS 4
.RE
.IP "option-popup (enabled by default)" 4
.IX Item "option-popup (enabled by default)"
Binds a popup menu to Ctrl\-Button2 that lets you toggle (some) options at
runtime.
.Sp
Other extensions can extend this popup menu by pushing a code reference
onto \f(CW\*(C`@{ $term\-\*(C'\fR{option_popup_hook} }>, which gets called whenever the
popup is being displayed.
.Sp
Its sole argument is the popup menu, which can be modified. It should
either return nothing or a string, the initial boolean value and a code
reference. The string will be used as button text and the code reference
will be called when the toggle changes, with the new boolean value as
first argument.
.Sp
The following will add an entry \f(CW\*(C`myoption\*(C'\fR that changes
\&\f(CW\*(C`$self\->{myoption}\*(C'\fR:
.Sp
.Vb 3
\& push @{ $self\->{term}{option_popup_hook} }, sub {
\& ("my option" => $myoption, sub { $self\->{myoption} = $_[0] })
\& };
.Ve
.IP "selection-popup (enabled by default)" 4
.IX Item "selection-popup (enabled by default)"
Binds a popup menu to Ctrl\-Button3 that lets you convert the selection
text into various other formats/action (such as uri unescaping, perl
evaluation, web-browser starting etc.), depending on content.
.Sp
Other extensions can extend this popup menu by pushing a code reference
onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, which gets called whenever the
popup is being displayed.
.Sp
Its sole argument is the popup menu, which can be modified. The selection
is in \f(CW$_\fR, which can be used to decide whether to add something or not.
It should either return nothing or a string and a code reference. The
string will be used as button text and the code reference will be called
when the button gets activated and should transform \f(CW$_\fR.
.Sp
The following will add an entry \f(CW\*(C`a to b\*(C'\fR that transforms all \f(CW\*(C`a\*(C'\fRs in
the selection to \f(CW\*(C`b\*(C'\fRs, but only if the selection currently contains any
\&\f(CW\*(C`a\*(C'\fRs:
.Sp
.Vb 4
\& push @{ $self\->{term}{selection_popup_hook} }, sub {
\& /a/ ? ("a to b" => sub { s/a/b/g }
\& : ()
\& };
.Ve
.IP "searchable\-scrollback<hotkey> (enabled by default)" 4
.IX Item "searchable-scrollback<hotkey> (enabled by default)"
Adds regex search functionality to the scrollback buffer, triggered
by a hotkey (default: \f(CW\*(C`M\-s\*(C'\fR). While in search mode, normal terminal
input/output is suspended and a regex is displayed at the bottom of the
screen.
.Sp
Inputting characters appends them to the regex and continues incremental
search. \f(CW\*(C`BackSpace\*(C'\fR removes a character from the regex, \f(CW\*(C`Up\*(C'\fR and \f(CW\*(C`Down\*(C'\fR
search upwards/downwards in the scrollback buffer, \f(CW\*(C`End\*(C'\fR jumps to the
bottom. \f(CW\*(C`Escape\*(C'\fR leaves search mode and returns to the point where search
was started, while \f(CW\*(C`Enter\*(C'\fR or \f(CW\*(C`Return\*(C'\fR stay at the current position and
additionally stores the first match in the current line into the primary
selection if the \f(CW\*(C`Shift\*(C'\fR modifier is active.
.Sp
The regex defaults to \*(L"(?i)\*(R", resulting in a case-insensitive search. To
get a case-sensitive search you can delete this prefix using \f(CW\*(C`BackSpace\*(C'\fR
or simply use an uppercase character which removes the \*(L"(?i)\*(R" prefix.
.Sp
See perlre for more info about perl regular expression syntax.
.IP "readline (enabled by default)" 4
.IX Item "readline (enabled by default)"
A support package that tries to make editing with readline easier. At
the moment, it reacts to clicking shift-left mouse button by trying to
move the text cursor to this position. It does so by generating as many
cursor-left or cursor-right keypresses as required (this only works
for programs that correctly support wide characters).
.Sp
To avoid too many false positives, this is only done when:
.RS 4
.IP "\- the tty is in \s-1ICANON\s0 state." 4
.IX Item "- the tty is in ICANON state."
.PD 0
.IP "\- the text cursor is visible." 4
.IX Item "- the text cursor is visible."
.IP "\- the primary screen is currently being displayed." 4
.IX Item "- the primary screen is currently being displayed."
.IP "\- the mouse is on the same (multi\-row\-) line as the text cursor." 4
.IX Item "- the mouse is on the same (multi-row-) line as the text cursor."
.RE
.RS 4
.PD
.Sp
The normal selection mechanism isn't disabled, so quick successive clicks
might interfere with selection creation in harmless ways.
.RE
.IP "selection-autotransform" 4
.IX Item "selection-autotransform"
This selection allows you to do automatic transforms on a selection
whenever a selection is made.
.Sp
It works by specifying perl snippets (most useful is a single \f(CW\*(C`s///\*(C'\fR
operator) that modify \f(CW$_\fR as resources:
.Sp
.Vb 3
\& URxvt.selection\-autotransform.0: transform
\& URxvt.selection\-autotransform.1: transform
\& ...
.Ve
.Sp
For example, the following will transform selections of the form
\&\f(CW\*(C`filename:number\*(C'\fR, often seen in compiler messages, into \f(CW\*(C`vi +$filename
$word\*(C'\fR:
.Sp
.Vb 1
\& URxvt.selection\-autotransform.0: s/^([^:[:space:]]+):(\e\ed+):?$/vi +$2 \e\eQ$1\e\eE\e\ex0d/
.Ve
.Sp
And this example matches the same,but replaces it with vi-commands you can
paste directly into your (vi :) editor:
.Sp
.Vb 1
\& URxvt.selection\-autotransform.0: s/^([^:[:space:]]+(\e\ed+):?$/:e \e\eQ$1\e\eE\e\ex0d:$2\e\ex0d/
.Ve
.Sp
Of course, this can be modified to suit your needs and your editor :)
.Sp
To expand the example above to typical perl error messages (\*(L"\s-1XXX\s0 at
\&\s-1FILENAME\s0 line \s-1YYY\s0.\*(R"), you need a slightly more elaborate solution:
.Sp
.Vb 2
\& URxvt.selection.pattern\-0: ( at .*? line \e\ed+[,.])
\& URxvt.selection\-autotransform.0: s/^ at (.*?) line (\e\ed+)[,.]$/:e \e\eQ$1\eE\e\ex0d:$2\e\ex0d/
.Ve
.Sp
The first line tells the selection code to treat the unchanging part of
every error message as a selection pattern, and the second line transforms
the message into vi commands to load the file.
.IP "tabbed" 4
.IX Item "tabbed"
This transforms the terminal into a tabbar with additional terminals, that
is, it implements what is commonly referred to as \*(L"tabbed terminal\*(R". The topmost line
displays a \*(L"[\s-1NEW\s0]\*(R" button, which, when clicked, will add a new tab, followed by one
button per tab.
.Sp
Clicking a button will activate that tab. Pressing \fBShift-Left\fR and
\&\fBShift-Right\fR will switch to the tab left or right of the current one,
while \fBShift-Down\fR creates a new tab.
.Sp
The tabbar itself can be configured similarly to a normal terminal, but
with a resource class of \f(CW\*(C`URxvt.tabbed\*(C'\fR. In addition, it supports the
following four resources (shown with defaults):
.Sp
.Vb 4
\& URxvt.tabbed.tabbar\-fg: <colour\-index, default 3>
\& URxvt.tabbed.tabbar\-bg: <colour\-index, default 0>
\& URxvt.tabbed.tab\-fg: <colour\-index, default 0>
\& URxvt.tabbed.tab\-bg: <colour\-index, default 1>
.Ve
.Sp
See \fI\s-1COLOR\s0 \s-1AND\s0 \s-1GRAPHICS\s0\fR in the @@RXVT_NAME@@(1) manpage for valid
indices.
.IP "matcher" 4
.IX Item "matcher"
Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline text
matching a certain pattern and make it clickable. When clicked with the
mouse button specified in the \f(CW\*(C`matcher.button\*(C'\fR resource (default 2, or
middle), the program specified in the \f(CW\*(C`matcher.launcher\*(C'\fR resource
(default, the \f(CW\*(C`urlLauncher\*(C'\fR resource, \f(CW\*(C`sensible\-browser\*(C'\fR) will be started
with the matched text as first argument. The default configuration is
suitable for matching URLs and launching a web browser, like the
former \*(L"mark-urls\*(R" extension.
.Sp
The default pattern to match URLs can be overridden with the
\&\f(CW\*(C`matcher.pattern.0\*(C'\fR resource, and additional patterns can be specified
with numbered patterns, in a manner similar to the \*(L"selection\*(R" extension.
The launcher can also be overridden on a per-pattern basis.
.Sp
It is possible to activate the most recently seen match from the keyboard.
Simply bind a keysym to \*(L"perl:matcher\*(R" as seen in the example below.
.Sp
Example configuration:
.Sp
.Vb 7
\& URxvt.perl\-ext: default,matcher
\& URxvt.urlLauncher: sensible\-browser
\& URxvt.keysym.C\-Delete: perl:matcher
\& URxvt.matcher.button: 1
\& URxvt.matcher.pattern.1: \e\ebwww\e\e.[\e\ew\-]+\e\e.[\e\ew./?&@#\-]*[\e\ew/\-]
\& URxvt.matcher.pattern.2: \e\eB(/\e\eS+?):(\e\ed+)(?=:|$)
\& URxvt.matcher.launcher.2: gvim +$2 $1
.Ve
.IP "xim-onthespot" 4
.IX Item "xim-onthespot"
This (experimental) perl extension implements OnTheSpot editing. It does
not work perfectly, and some input methods don't seem to work well with
OnTheSpot editing in general, but it seems to work at least for \s-1SCIM\s0 and
kinput2.
.Sp
You enable it by specifying this extension and a preedit style of
\&\f(CW\*(C`OnTheSpot\*(C'\fR, i.e.:
.Sp
.Vb 1
\& @@RXVT_NAME@@ \-pt OnTheSpot \-pe xim\-onthespot
.Ve
.IP "kuake<hotkey>" 4
.IX Item "kuake<hotkey>"
A very primitive quake-console-like extension. It was inspired by a
description of how the programs \f(CW\*(C`kuake\*(C'\fR and \f(CW\*(C`yakuake\*(C'\fR work: Whenever the
user presses a global accelerator key (by default \f(CW\*(C`F10\*(C'\fR), the terminal
will show or hide itself. Another press of the accelerator key will hide
or show it again.
.Sp
Initially, the window will not be shown when using this extension.
.Sp
This is useful if you need a single terminal that is not using any desktop
space most of the time but is quickly available at the press of a key.
.Sp
The accelerator key is grabbed regardless of any modifiers, so this
extension will actually grab a physical key just for this function.
.Sp
If you want a quake-like animation, tell your window manager to do so
(fvwm can do it).
.IP "overlay-osc" 4
.IX Item "overlay-osc"
This extension implements some \s-1OSC\s0 commands to display timed popups on the
screen \- useful for status displays from within scripts. You have to read
the sources for more info.
.IP "block-graphics-to-ascii" 4
.IX Item "block-graphics-to-ascii"
A not very useful example of filtering all text output to the terminal
by replacing all line-drawing characters (U+2500 .. U+259F) by a
similar-looking ascii character.
.IP "digital-clock" 4
.IX Item "digital-clock"
Displays a digital clock using the built-in overlay.
.IP "remote-clipboard" 4
.IX Item "remote-clipboard"
Somewhat of a misnomer, this extension adds two menu entries to the
selection popup that allows one to run external commands to store the
selection somewhere and fetch it again.
.Sp
We use it to implement a \*(L"distributed selection mechanism\*(R", which just
means that one command uploads the file to a remote server, and another
reads it.
.Sp
The commands can be set using the \f(CW\*(C`URxvt.remote\-selection.store\*(C'\fR and
\&\f(CW\*(C`URxvt.remote\-selection.fetch\*(C'\fR resources. The first should read the
selection to store from \s-1STDIN\s0 (always in \s-1UTF\-8\s0), the second should provide
the selection data on \s-1STDOUT\s0 (also in \s-1UTF\-8\s0).
.Sp
The defaults (which are likely useless to you) use rsh and cat:
.Sp
.Vb 2
\& URxvt.remote\-selection.store: rsh ruth \*(Aqcat >/tmp/distributed\-selection\*(Aq
\& URxvt.remote\-selection.fetch: rsh ruth \*(Aqcat /tmp/distributed\-selection\*(Aq
.Ve
.IP "selection-pastebin" 4
.IX Item "selection-pastebin"
This is a little rarely useful extension that Uploads the selection as
textfile to a remote site (or does other things). (The implementation is
not currently secure for use in a multiuser environment as it writes to
\&\fI/tmp\fR directly.).
.Sp
It listens to the \f(CW\*(C`selection\-pastebin:remote\-pastebin\*(C'\fR keyboard command,
i.e.
.Sp
.Vb 1
\& URxvt.keysym.C\-M\-e: perl:selection\-pastebin:remote\-pastebin
.Ve
.Sp
Pressing this combination runs a command with \f(CW\*(C`%\*(C'\fR replaced by the name of
the textfile. This command can be set via a resource:
.Sp
.Vb 1
\& URxvt.selection\-pastebin.cmd: rsync \-apP % ruth:/var/www/www.ta\-sa.org/files/txt/.
.Ve
.Sp
And the default is likely not useful to anybody but the few people around
here :)
.Sp
The name of the textfile is the hex encoded md5 sum of the selection, so
the same content should lead to the same filename.
.Sp
After a successful upload the selection will be replaced by the text given
in the \f(CW\*(C`selection\-pastebin\-url\*(C'\fR resource (again, the % is the placeholder
for the filename):
.Sp
.Vb 1
\& URxvt.selection\-pastebin.url: http://www.ta\-sa.org/files/txt/%
.Ve
.Sp
\&\fINote to xrdb users:\fR xrdb uses the C preprocessor, which might interpret
the double \f(CW\*(C`/\*(C'\fR characters as comment start. Use \f(CW\*(C`\e057\e057\*(C'\fR instead,
which works regardless of wether xrdb is used to parse the resource file
or not.
.IP "example-refresh-hooks" 4
.IX Item "example-refresh-hooks"
Displays a very simple digital clock in the upper right corner of the
window. Illustrates overwriting the refresh callbacks to create your own
overlays or changes.
.SH "API DOCUMENTATION"
.IX Header "API DOCUMENTATION"
.Sh "General \s-1API\s0 Considerations"
.IX Subsection "General API Considerations"
All objects (such as terminals, time watchers etc.) are typical
reference-to-hash objects. The hash can be used to store anything you
like. All members starting with an underscore (such as \f(CW\*(C`_ptr\*(C'\fR or
\&\f(CW\*(C`_hook\*(C'\fR) are reserved for internal uses and \fB\s-1MUST\s0 \s-1NOT\s0\fR be accessed or
modified).
.PP
When objects are destroyed on the \*(C+ side, the perl object hashes are
emptied, so its best to store related objects such as time watchers and
the like inside the terminal object so they get destroyed as soon as the
terminal is destroyed.
.PP
Argument names also often indicate the type of a parameter. Here are some
hints on what they mean:
.ie n .IP "$text" 4
.el .IP "\f(CW$text\fR" 4
.IX Item "$text"
Rxvt-unicodes special way of encoding text, where one \*(L"unicode\*(R" character
always represents one screen cell. See ROW_t for a discussion of this format.
.ie n .IP "$string" 4
.el .IP "\f(CW$string\fR" 4
.IX Item "$string"
A perl text string, with an emphasis on \fItext\fR. It can store all unicode
characters and is to be distinguished with text encoded in a specific
encoding (often locale-specific) and binary data.
.ie n .IP "$octets" 4
.el .IP "\f(CW$octets\fR" 4
.IX Item "$octets"
Either binary data or \- more common \- a text string encoded in a
locale-specific way.
.Sh "Extension Objects"
.IX Subsection "Extension Objects"
Every perl extension is a perl class. A separate perl object is created
for each terminal, and each terminal has its own set of extenion objects,
which are passed as the first parameter to hooks. So extensions can use
their \f(CW$self\fR object without having to think about clashes with other
extensions or other terminals, with the exception of methods and members
that begin with an underscore character \f(CW\*(C`_\*(C'\fR: these are reserved for
internal use.
.PP
Although it isn't a \f(CW\*(C`urxvt::term\*(C'\fR object, you can call all methods of the
\&\f(CW\*(C`urxvt::term\*(C'\fR class on this object.
.PP
It has the following methods and data members:
.ie n .IP "$urxvt_term\fR = \f(CW$self\->{term}" 4
.el .IP "\f(CW$urxvt_term\fR = \f(CW$self\fR\->{term}" 4
.IX Item "$urxvt_term = $self->{term}"
Returns the \f(CW\*(C`urxvt::term\*(C'\fR object associated with this instance of the
extension. This member \fImust not\fR be changed in any way.
.ie n .IP "$self\fR\->enable ($hook_name => \f(CW$cb\fR, [$hook_name => \f(CW$cb..])" 4
.el .IP "\f(CW$self\fR\->enable ($hook_name => \f(CW$cb\fR, [$hook_name => \f(CW$cb\fR..])" 4
.IX Item "$self->enable ($hook_name => $cb, [$hook_name => $cb..])"
Dynamically enable the given hooks (named without the \f(CW\*(C`on_\*(C'\fR prefix) for
this extension, replacing any previous hook. This is useful when you want
to overwrite time-critical hooks only temporarily.
.ie n .IP "$self\fR\->disable ($hook_name[, \f(CW$hook_name..])" 4
.el .IP "\f(CW$self\fR\->disable ($hook_name[, \f(CW$hook_name\fR..])" 4
.IX Item "$self->disable ($hook_name[, $hook_name..])"
Dynamically disable the given hooks.
.Sh "Hooks"
.IX Subsection "Hooks"
The following subroutines can be declared in extension files, and will be
called whenever the relevant event happens.
.PP
The first argument passed to them is an extension object as described in
the in the \f(CW\*(C`Extension Objects\*(C'\fR section.
.PP
\&\fBAll\fR of these hooks must return a boolean value. If any of the called
hooks returns true, then the event counts as being \fIconsumed\fR, and the
relevant action might not be carried out by the \*(C+ code.
.PP
\&\fIWhen in doubt, return a false value (preferably \f(CI\*(C`()\*(C'\fI).\fR
.ie n .IP "on_init $term" 4
.el .IP "on_init \f(CW$term\fR" 4
.IX Item "on_init $term"
Called after a new terminal object has been initialized, but before
windows are created or the command gets run. Most methods are unsafe to
call or deliver senseless data, as terminal size and other characteristics
have not yet been determined. You can safely query and change resources
and options, though. For many purposes the \f(CW\*(C`on_start\*(C'\fR hook is a better
place.
.ie n .IP "on_start $term" 4
.el .IP "on_start \f(CW$term\fR" 4
.IX Item "on_start $term"
Called at the very end of initialisation of a new terminal, just before
trying to map (display) the toplevel and returning to the main loop.
.ie n .IP "on_destroy $term" 4
.el .IP "on_destroy \f(CW$term\fR" 4
.IX Item "on_destroy $term"
Called whenever something tries to destroy terminal, when the terminal is
still fully functional (not for long, though).
.ie n .IP "on_reset $term" 4
.el .IP "on_reset \f(CW$term\fR" 4
.IX Item "on_reset $term"
Called after the screen is \*(L"reset\*(R" for any reason, such as resizing or
control sequences. Here is where you can react on changes to size-related
variables.
.ie n .IP "on_child_start $term\fR, \f(CW$pid" 4
.el .IP "on_child_start \f(CW$term\fR, \f(CW$pid\fR" 4
.IX Item "on_child_start $term, $pid"
Called just after the child process has been \f(CW\*(C`fork\*(C'\fRed.
.ie n .IP "on_child_exit $term\fR, \f(CW$status" 4
.el .IP "on_child_exit \f(CW$term\fR, \f(CW$status\fR" 4
.IX Item "on_child_exit $term, $status"
Called just after the child process has exited. \f(CW$status\fR is the status
from \f(CW\*(C`waitpid\*(C'\fR.
.ie n .IP "on_sel_make $term\fR, \f(CW$eventtime" 4
.el .IP "on_sel_make \f(CW$term\fR, \f(CW$eventtime\fR" 4
.IX Item "on_sel_make $term, $eventtime"
Called whenever a selection has been made by the user, but before the
selection text is copied, so changes to the beginning, end or type of the
selection will be honored.
.Sp
Returning a true value aborts selection making by urxvt, in which case you
have to make a selection yourself by calling \f(CW\*(C`$term\->selection_grab\*(C'\fR.
.ie n .IP "on_sel_grab $term\fR, \f(CW$eventtime" 4
.el .IP "on_sel_grab \f(CW$term\fR, \f(CW$eventtime\fR" 4
.IX Item "on_sel_grab $term, $eventtime"
Called whenever a selection has been copied, but before the selection is
requested from the server. The selection text can be queried and changed
by calling \f(CW\*(C`$term\->selection\*(C'\fR.
.Sp
Returning a true value aborts selection grabbing. It will still be highlighted.
.ie n .IP "on_sel_extend $term" 4
.el .IP "on_sel_extend \f(CW$term\fR" 4
.IX Item "on_sel_extend $term"
Called whenever the user tries to extend the selection (e.g. with a double
click) and is either supposed to return false (normal operation), or
should extend the selection itself and return true to suppress the built-in
processing. This can happen multiple times, as long as the callback
returns true, it will be called on every further click by the user and is
supposed to enlarge the selection more and more, if possible.
.Sp
See the \fIselection\fR example extension.
.ie n .IP "on_view_change $term\fR, \f(CW$offset" 4
.el .IP "on_view_change \f(CW$term\fR, \f(CW$offset\fR" 4
.IX Item "on_view_change $term, $offset"
Called whenever the view offset changes, i.e. the user or program
scrolls. Offset \f(CW0\fR means display the normal terminal, positive values
show this many lines of scrollback.
.ie n .IP "on_scroll_back $term\fR, \f(CW$lines\fR, \f(CW$saved" 4
.el .IP "on_scroll_back \f(CW$term\fR, \f(CW$lines\fR, \f(CW$saved\fR" 4
.IX Item "on_scroll_back $term, $lines, $saved"
Called whenever lines scroll out of the terminal area into the scrollback
buffer. \f(CW$lines\fR is the number of lines scrolled out and may be larger
than the scroll back buffer or the terminal.
.Sp
It is called before lines are scrolled out (so rows 0 .. min ($lines \- 1,
\&\f(CW$nrow\fR \- 1) represent the lines to be scrolled out). \f(CW$saved\fR is the total
number of lines that will be in the scrollback buffer.
.ie n .IP "on_osc_seq $term\fR, \f(CW$op\fR, \f(CW$args\fR, \f(CW$resp" 4
.el .IP "on_osc_seq \f(CW$term\fR, \f(CW$op\fR, \f(CW$args\fR, \f(CW$resp\fR" 4
.IX Item "on_osc_seq $term, $op, $args, $resp"
Called on every \s-1OSC\s0 sequence and can be used to suppress it or modify its
behaviour. The default should be to return an empty list. A true value
suppresses execution of the request completely. Make sure you don't get
confused by recursive invocations when you output an \s-1OSC\s0 sequence within
this callback.
.Sp
\&\f(CW\*(C`on_osc_seq_perl\*(C'\fR should be used for new behaviour.
.ie n .IP "on_osc_seq_perl $term\fR, \f(CW$args\fR, \f(CW$resp" 4
.el .IP "on_osc_seq_perl \f(CW$term\fR, \f(CW$args\fR, \f(CW$resp\fR" 4
.IX Item "on_osc_seq_perl $term, $args, $resp"
Called whenever the \fB\s-1ESC\s0 ] 777 ; string \s-1ST\s0\fR command sequence (\s-1OSC\s0 =
operating system command) is processed. Cursor position and other state
information is up-to-date when this happens. For interoperability, the
string should start with the extension name (sans \-osc) and a semicolon,
to distinguish it from commands for other extensions, and this might be
enforced in the future.
.Sp
For example, \f(CW\*(C`overlay\-osc\*(C'\fR uses this:
.Sp
.Vb 2
\& sub on_osc_seq_perl {
\& my ($self, $osc, $resp) = @_;
\&
\& return unless $osc =~ s/^overlay;//;
\&
\& ... process remaining $osc string
\& }
.Ve
.Sp
Be careful not ever to trust (in a security sense) the data you receive,
as its source can not easily be controlled (e\-mail content, messages from
other users on the same system etc.).
.Sp
For responses, \f(CW$resp\fR contains the end-of-args separator used by the
sender.
.ie n .IP "on_add_lines $term\fR, \f(CW$string" 4
.el .IP "on_add_lines \f(CW$term\fR, \f(CW$string\fR" 4
.IX Item "on_add_lines $term, $string"
Called whenever text is about to be output, with the text as argument. You
can filter/change and output the text yourself by returning a true value
and calling \f(CW\*(C`$term\->scr_add_lines\*(C'\fR yourself. Please note that this
might be very slow, however, as your hook is called for \fBall\fR text being
output.
.ie n .IP "on_tt_write $term\fR, \f(CW$octets" 4
.el .IP "on_tt_write \f(CW$term\fR, \f(CW$octets\fR" 4
.IX Item "on_tt_write $term, $octets"
Called whenever some data is written to the tty/pty and can be used to
suppress or filter tty input.
.ie n .IP "on_line_update $term\fR, \f(CW$row" 4
.el .IP "on_line_update \f(CW$term\fR, \f(CW$row\fR" 4
.IX Item "on_line_update $term, $row"
Called whenever a line was updated or changed. Can be used to filter
screen output (e.g. underline urls or other useless stuff). Only lines
that are being shown will be filtered, and, due to performance reasons,
not always immediately.
.Sp
The row number is always the topmost row of the line if the line spans
multiple rows.
.Sp
Please note that, if you change the line, then the hook might get called
later with the already-modified line (e.g. if unrelated parts change), so
you cannot just toggle rendition bits, but only set them.
.ie n .IP "on_refresh_begin $term" 4
.el .IP "on_refresh_begin \f(CW$term\fR" 4
.IX Item "on_refresh_begin $term"
Called just before the screen gets redrawn. Can be used for overlay or
similar effects by modifying the terminal contents in refresh_begin, and
restoring them in refresh_end. The built-in overlay and selection display
code is run after this hook, and takes precedence.
.ie n .IP "on_refresh_end $term" 4
.el .IP "on_refresh_end \f(CW$term\fR" 4
.IX Item "on_refresh_end $term"
Called just after the screen gets redrawn. See \f(CW\*(C`on_refresh_begin\*(C'\fR.
.ie n .IP "on_user_command $term\fR, \f(CW$string" 4
.el .IP "on_user_command \f(CW$term\fR, \f(CW$string\fR" 4
.IX Item "on_user_command $term, $string"
Called whenever a user-configured event is being activated (e.g. via
a \f(CW\*(C`perl:string\*(C'\fR action bound to a key, see description of the \fBkeysym\fR
resource in the @@RXVT_NAME@@(1) manpage).
.Sp
The event is simply the action string. This interface is assumed to change
slightly in the future.
.ie n .IP "on_resize_all_windows $tern\fR, \f(CW$new_width\fR, \f(CW$new_height" 4
.el .IP "on_resize_all_windows \f(CW$tern\fR, \f(CW$new_width\fR, \f(CW$new_height\fR" 4
.IX Item "on_resize_all_windows $tern, $new_width, $new_height"
Called just after the new window size has been calculated, but before
windows are actually being resized or hints are being set. If this hook
returns \s-1TRUE\s0, setting of the window hints is being skipped.
.ie n .IP "on_x_event $term\fR, \f(CW$event" 4
.el .IP "on_x_event \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_x_event $term, $event"
Called on every X event received on the vt window (and possibly other
windows). Should only be used as a last resort. Most event structure
members are not passed.
.ie n .IP "on_root_event $term\fR, \f(CW$event" 4
.el .IP "on_root_event \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_root_event $term, $event"
Like \f(CW\*(C`on_x_event\*(C'\fR, but is called for events on the root window.
.ie n .IP "on_focus_in $term" 4
.el .IP "on_focus_in \f(CW$term\fR" 4
.IX Item "on_focus_in $term"
Called whenever the window gets the keyboard focus, before rxvt-unicode
does focus in processing.
.ie n .IP "on_focus_out $term" 4
.el .IP "on_focus_out \f(CW$term\fR" 4
.IX Item "on_focus_out $term"
Called whenever the window loses keyboard focus, before rxvt-unicode does
focus out processing.
.ie n .IP "on_configure_notify $term\fR, \f(CW$event" 4
.el .IP "on_configure_notify \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_configure_notify $term, $event"
.PD 0
.ie n .IP "on_property_notify $term\fR, \f(CW$event" 4
.el .IP "on_property_notify \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_property_notify $term, $event"
.ie n .IP "on_key_press $term\fR, \f(CW$event\fR, \f(CW$keysym\fR, \f(CW$octets" 4
.el .IP "on_key_press \f(CW$term\fR, \f(CW$event\fR, \f(CW$keysym\fR, \f(CW$octets\fR" 4
.IX Item "on_key_press $term, $event, $keysym, $octets"
.ie n .IP "on_key_release $term\fR, \f(CW$event\fR, \f(CW$keysym" 4
.el .IP "on_key_release \f(CW$term\fR, \f(CW$event\fR, \f(CW$keysym\fR" 4
.IX Item "on_key_release $term, $event, $keysym"
.ie n .IP "on_button_press $term\fR, \f(CW$event" 4
.el .IP "on_button_press \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_button_press $term, $event"
.ie n .IP "on_button_release $term\fR, \f(CW$event" 4
.el .IP "on_button_release \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_button_release $term, $event"
.ie n .IP "on_motion_notify $term\fR, \f(CW$event" 4
.el .IP "on_motion_notify \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_motion_notify $term, $event"
.ie n .IP "on_map_notify $term\fR, \f(CW$event" 4
.el .IP "on_map_notify \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_map_notify $term, $event"
.ie n .IP "on_unmap_notify $term\fR, \f(CW$event" 4
.el .IP "on_unmap_notify \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_unmap_notify $term, $event"
.PD
Called whenever the corresponding X event is received for the terminal If
the hook returns true, then the even will be ignored by rxvt-unicode.
.Sp
The event is a hash with most values as named by Xlib (see the XEvent
manpage), with the additional members \f(CW\*(C`row\*(C'\fR and \f(CW\*(C`col\*(C'\fR, which are the
(real, not screen-based) row and column under the mouse cursor.
.Sp
\&\f(CW\*(C`on_key_press\*(C'\fR additionally receives the string rxvt-unicode would
output, if any, in locale-specific encoding.
.Sp
subwindow.
.ie n .IP "on_client_message $term\fR, \f(CW$event" 4
.el .IP "on_client_message \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_client_message $term, $event"
.PD 0
.ie n .IP "on_wm_protocols $term\fR, \f(CW$event" 4
.el .IP "on_wm_protocols \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_wm_protocols $term, $event"
.ie n .IP "on_wm_delete_window $term\fR, \f(CW$event" 4
.el .IP "on_wm_delete_window \f(CW$term\fR, \f(CW$event\fR" 4
.IX Item "on_wm_delete_window $term, $event"
.PD
Called when various types of ClientMessage events are received (all with
format=32, \s-1WM_PROTOCOLS\s0 or \s-1WM_PROTOCOLS:WM_DELETE_WINDOW\s0).
.ie n .Sh "Variables in the ""urxvt"" Package"
.el .Sh "Variables in the \f(CWurxvt\fP Package"
.IX Subsection "Variables in the urxvt Package"
.ie n .IP "$urxvt::LIBDIR" 4
.el .IP "\f(CW$urxvt::LIBDIR\fR" 4
.IX Item "$urxvt::LIBDIR"
The rxvt-unicode library directory, where, among other things, the perl
modules and scripts are stored.
.ie n .IP "$urxvt::RESCLASS\fR, \f(CW$urxvt::RESCLASS" 4
.el .IP "\f(CW$urxvt::RESCLASS\fR, \f(CW$urxvt::RESCLASS\fR" 4
.IX Item "$urxvt::RESCLASS, $urxvt::RESCLASS"
The resource class and name rxvt-unicode uses to look up X resources.
.ie n .IP "$urxvt::RXVTNAME" 4
.el .IP "\f(CW$urxvt::RXVTNAME\fR" 4
.IX Item "$urxvt::RXVTNAME"
The basename of the installed binaries, usually \f(CW\*(C`urxvt\*(C'\fR.
.ie n .IP "$urxvt::TERM" 4
.el .IP "\f(CW$urxvt::TERM\fR" 4
.IX Item "$urxvt::TERM"
The current terminal. This variable stores the current \f(CW\*(C`urxvt::term\*(C'\fR
object, whenever a callback/hook is executing.
.ie n .IP "@urxvt::TERM_INIT" 4
.el .IP "\f(CW@urxvt::TERM_INIT\fR" 4
.IX Item "@urxvt::TERM_INIT"
All code references in this array will be called as methods of the next newly
created \f(CW\*(C`urxvt::term\*(C'\fR object (during the \f(CW\*(C`on_init\*(C'\fR phase). The array
gets cleared before the code references that were in it are being executed,
so references can push themselves onto it again if they so desire.
.Sp
This complements to the perl-eval command line option, but gets executed
first.
.ie n .IP "@urxvt::TERM_EXT" 4
.el .IP "\f(CW@urxvt::TERM_EXT\fR" 4
.IX Item "@urxvt::TERM_EXT"
Works similar to \f(CW@TERM_INIT\fR, but contains perl package/class names, which
get registered as normal extensions after calling the hooks in \f(CW@TERM_INIT\fR
but before other extensions. Gets cleared just like \f(CW@TERM_INIT\fR.
.ie n .Sh "Functions in the ""urxvt"" Package"
.el .Sh "Functions in the \f(CWurxvt\fP Package"
.IX Subsection "Functions in the urxvt Package"
.ie n .IP "urxvt::fatal $errormessage" 4
.el .IP "urxvt::fatal \f(CW$errormessage\fR" 4
.IX Item "urxvt::fatal $errormessage"
Fatally aborts execution with the given error message. Avoid at all
costs! The only time this is acceptable is when the terminal process
starts up.
.ie n .IP "urxvt::warn $string" 4
.el .IP "urxvt::warn \f(CW$string\fR" 4
.IX Item "urxvt::warn $string"
Calls \f(CW\*(C`rxvt_warn\*(C'\fR with the given string which should not include a
newline. The module also overwrites the \f(CW\*(C`warn\*(C'\fR builtin with a function
that calls this function.
.Sp
Using this function has the advantage that its output ends up in the
correct place, e.g. on stderr of the connecting urxvtc client.
.Sp
Messages have a size limit of 1023 bytes currently.
.ie n .IP "@terms = urxvt::termlist" 4
.el .IP "\f(CW@terms\fR = urxvt::termlist" 4
.IX Item "@terms = urxvt::termlist"
Returns all urxvt::term objects that exist in this process, regardless of
whether they are started, being destroyed etc., so be careful. Only term
objects that have perl extensions attached will be returned (because there
is no urxvt::term objet associated with others).
.ie n .IP "$time = urxvt::NOW" 4
.el .IP "\f(CW$time\fR = urxvt::NOW" 4
.IX Item "$time = urxvt::NOW"
Returns the \*(L"current time\*(R" (as per the event loop).
.IP "urxvt::CurrentTime" 4
.IX Item "urxvt::CurrentTime"
.PD 0
.IP "urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask, AnyModifier" 4
.IX Item "urxvt::ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask, AnyModifier"
.IP "urxvt::NoEventMask, KeyPressMask, KeyReleaseMask, ButtonPressMask, ButtonReleaseMask, EnterWindowMask, LeaveWindowMask, PointerMotionMask, PointerMotionHintMask, Button1MotionMask, Button2MotionMask, Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask, KeymapStateMask, ExposureMask, VisibilityChangeMask, StructureNotifyMask, ResizeRedirectMask, SubstructureNotifyMask, SubstructureRedirectMask, FocusChangeMask, PropertyChangeMask, ColormapChangeMask, OwnerGrabButtonMask" 4
.IX Item "urxvt::NoEventMask, KeyPressMask, KeyReleaseMask, ButtonPressMask, ButtonReleaseMask, EnterWindowMask, LeaveWindowMask, PointerMotionMask, PointerMotionHintMask, Button1MotionMask, Button2MotionMask, Button3MotionMask, Button4MotionMask, Button5MotionMask, ButtonMotionMask, KeymapStateMask, ExposureMask, VisibilityChangeMask, StructureNotifyMask, ResizeRedirectMask, SubstructureNotifyMask, SubstructureRedirectMask, FocusChangeMask, PropertyChangeMask, ColormapChangeMask, OwnerGrabButtonMask"
.IP "urxvt::KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, EnterNotify, LeaveNotify, FocusIn, FocusOut, KeymapNotify, Expose, GraphicsExpose, NoExpose, VisibilityNotify, CreateNotify, DestroyNotify, UnmapNotify, MapNotify, MapRequest, ReparentNotify, ConfigureNotify, ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify, CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest, SelectionNotify, ColormapNotify, ClientMessage, MappingNotify" 4
.IX Item "urxvt::KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, EnterNotify, LeaveNotify, FocusIn, FocusOut, KeymapNotify, Expose, GraphicsExpose, NoExpose, VisibilityNotify, CreateNotify, DestroyNotify, UnmapNotify, MapNotify, MapRequest, ReparentNotify, ConfigureNotify, ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify, CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest, SelectionNotify, ColormapNotify, ClientMessage, MappingNotify"
.PD
Various constants for use in X calls and event processing.
.Sh "\s-1RENDITION\s0"
.IX Subsection "RENDITION"
Rendition bitsets contain information about colour, font, font styles and
similar information for each screen cell.
.PP
The following \*(L"macros\*(R" deal with changes in rendition sets. You should
never just create a bitset, you should always modify an existing one,
as they contain important information required for correct operation of
rxvt-unicode.
.ie n .IP "$rend = urxvt::DEFAULT_RSTYLE" 4
.el .IP "\f(CW$rend\fR = urxvt::DEFAULT_RSTYLE" 4
.IX Item "$rend = urxvt::DEFAULT_RSTYLE"
Returns the default rendition, as used when the terminal is starting up or
being reset. Useful as a base to start when creating renditions.
.ie n .IP "$rend = urxvt::OVERLAY_RSTYLE" 4
.el .IP "\f(CW$rend\fR = urxvt::OVERLAY_RSTYLE" 4
.IX Item "$rend = urxvt::OVERLAY_RSTYLE"
Return the rendition mask used for overlays by default.
.ie n .IP "$rendbit = urxvt::RS_Bold, RS_Italic, RS_Blink, RS_RVid, RS_Uline" 4
.el .IP "\f(CW$rendbit\fR = urxvt::RS_Bold, RS_Italic, RS_Blink, RS_RVid, RS_Uline" 4
.IX Item "$rendbit = urxvt::RS_Bold, RS_Italic, RS_Blink, RS_RVid, RS_Uline"
Return the bit that enabled bold, italic, blink, reverse-video and
underline, respectively. To enable such a style, just logically \s-1OR\s0 it into
the bitset.
.ie n .IP "$foreground\fR = urxvt::GET_BASEFG \f(CW$rend" 4
.el .IP "\f(CW$foreground\fR = urxvt::GET_BASEFG \f(CW$rend\fR" 4
.IX Item "$foreground = urxvt::GET_BASEFG $rend"
.PD 0
.ie n .IP "$background\fR = urxvt::GET_BASEBG \f(CW$rend" 4
.el .IP "\f(CW$background\fR = urxvt::GET_BASEBG \f(CW$rend\fR" 4
.IX Item "$background = urxvt::GET_BASEBG $rend"
.PD
Return the foreground/background colour index, respectively.
.ie n .IP "$rend\fR = urxvt::SET_FGCOLOR \f(CW$rend\fR, \f(CW$new_colour" 4
.el .IP "\f(CW$rend\fR = urxvt::SET_FGCOLOR \f(CW$rend\fR, \f(CW$new_colour\fR" 4
.IX Item "$rend = urxvt::SET_FGCOLOR $rend, $new_colour"
.PD 0
.ie n .IP "$rend\fR = urxvt::SET_BGCOLOR \f(CW$rend\fR, \f(CW$new_colour" 4
.el .IP "\f(CW$rend\fR = urxvt::SET_BGCOLOR \f(CW$rend\fR, \f(CW$new_colour\fR" 4
.IX Item "$rend = urxvt::SET_BGCOLOR $rend, $new_colour"
.ie n .IP "$rend\fR = urxvt::SET_COLOR \f(CW$rend\fR, \f(CW$new_fg\fR, \f(CW$new_bg" 4
.el .IP "\f(CW$rend\fR = urxvt::SET_COLOR \f(CW$rend\fR, \f(CW$new_fg\fR, \f(CW$new_bg\fR" 4
.IX Item "$rend = urxvt::SET_COLOR $rend, $new_fg, $new_bg"
.PD
Replace the foreground/background colour in the rendition mask with the
specified one.
.ie n .IP "$value\fR = urxvt::GET_CUSTOM \f(CW$rend" 4
.el .IP "\f(CW$value\fR = urxvt::GET_CUSTOM \f(CW$rend\fR" 4
.IX Item "$value = urxvt::GET_CUSTOM $rend"
Return the \*(L"custom\*(R" value: Every rendition has 5 bits for use by
extensions. They can be set and changed as you like and are initially
zero.
.ie n .IP "$rend\fR = urxvt::SET_CUSTOM \f(CW$rend\fR, \f(CW$new_value" 4
.el .IP "\f(CW$rend\fR = urxvt::SET_CUSTOM \f(CW$rend\fR, \f(CW$new_value\fR" 4
.IX Item "$rend = urxvt::SET_CUSTOM $rend, $new_value"
Change the custom value.
.ie n .Sh "The ""urxvt::anyevent"" Class"
.el .Sh "The \f(CWurxvt::anyevent\fP Class"
.IX Subsection "The urxvt::anyevent Class"
The sole purpose of this class is to deliver an interface to the
\&\f(CW\*(C`AnyEvent\*(C'\fR module \- any module using it will work inside urxvt without
further programming. The only exception is that you cannot wait on
condition variables, but non-blocking condvar use is ok. What this means
is that you cannot use blocking APIs, but the non-blocking variant should
work.
.ie n .Sh "The ""urxvt::term"" Class"