1 | #! perl |
1 | #! perl |
|
|
2 | |
|
|
3 | #:META:X_RESOURCE:%.hotkey:string:activation hotkey keysym |
2 | |
4 | |
3 | =head1 NAME |
5 | =head1 NAME |
4 | |
6 | |
5 | kuake<hotkey> - kuake-like hotkey terminal |
7 | kuake - kuake-like hotkey terminal |
|
|
8 | |
|
|
9 | =head1 EXAMPLES |
|
|
10 | |
|
|
11 | @@RXVT_NAME@@ -kuake-hotkey F10 |
|
|
12 | |
|
|
13 | URxvt.kuake.hotkey: F10 |
6 | |
14 | |
7 | =head1 DESCRIPTION |
15 | =head1 DESCRIPTION |
8 | |
16 | |
9 | A very primitive quake-console-like extension. It was inspired by a |
17 | A very primitive quake-console-like extension. It was inspired by a |
10 | description of how the programs C<kuake> and C<yakuake> work: Whenever the |
18 | description of how the programs C<kuake> and C<yakuake> work: Whenever the |
… | |
… | |
26 | =cut |
34 | =cut |
27 | |
35 | |
28 | sub on_start { |
36 | sub on_start { |
29 | my ($self) = @_; |
37 | my ($self) = @_; |
30 | |
38 | |
31 | $self->{key} = $self->{argv}[0] || "F10"; |
39 | $self->{key} = $self->{argv}[0] || $self->x_resource ("%.hotkey") || "F10"; |
32 | |
40 | |
33 | $self->{keysym} = $self->XStringToKeysym ($self->{key}) |
41 | $self->{keysym} = $self->XStringToKeysym ($self->{key}) |
34 | 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"; |
35 | |
43 | |
36 | $self->{keycode} = $self->XKeysymToKeycode ($self->{keysym}) |
44 | $self->{keycode} = $self->XKeysymToKeycode ($self->{keysym}) |