ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/kuake
(Generate patch)

Comparing rxvt-unicode/src/perl/kuake (file contents):
Revision 1.2 by sf-exg, Sun Nov 20 11:09:22 2011 UTC vs.
Revision 1.6 by root, Fri May 2 08:59:42 2014 UTC

1#! perl 1#! perl
2
3#:META:X_RESOURCE:%.hotkey:string:activation hotkey keysym
4
5=head1 NAME
6
7kuake - kuake-like hotkey terminal
8
9=head1 EXAMPLES
10
11 @@RXVT_NAME@@ -kuake-hotkey F10
12
13 URxvt.kuake.hotkey: F10
14
15=head1 DESCRIPTION
16
17A very primitive quake-console-like extension. It was inspired by a
18description of how the programs C<kuake> and C<yakuake> work: Whenever the
19user presses a global accelerator key (by default C<F10>), the terminal
20will show or hide itself. Another press of the accelerator key will hide
21or show it again.
22
23Initially, the window will not be shown when using this extension.
24
25This is useful if you need a single terminal that is not using any desktop
26space most of the time but is quickly available at the press of a key.
27
28The accelerator key is grabbed regardless of any modifiers, so this
29extension will actually grab a physical key just for this function.
30
31If you want a quake-like animation, tell your window manager to do so
32(fvwm can do it).
33
34=cut
2 35
3sub on_start { 36sub on_start {
4 my ($self) = @_; 37 my ($self) = @_;
5 38
6 $self->{key} = $self->{argv}[0] || "F10"; 39 $self->{key} = $self->{argv}[0] || $self->x_resource ("%.hotkey") || "F10";
7 40
8 $self->{keysym} = $self->XStringToKeysym ($self->{key}) 41 $self->{keysym} = $self->XStringToKeysym ($self->{key})
9 or urxvt::fatal "cannot convert requested kuake wake-up key '$self->{key}' to keysym, unable to continue.\n"; 42 or urxvt::fatal "cannot convert requested kuake wake-up key '$self->{key}' to keysym, unable to continue.\n";
10 43
11 $self->{keycode} = $self->XKeysymToKeycode ($self->{keysym}) 44 $self->{keycode} = $self->XKeysymToKeycode ($self->{keysym})

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines