From e1f353b337bc3fe30a74647710381849ad803dda Mon Sep 17 00:00:00 2001 From: Mike Fisher Date: Fri, 31 May 2013 11:07:30 +0100 Subject: [PATCH 1/3] Fix qw syntax error Fixes syntax error: urxvt: perl hook 0 evaluation error: /usr/lib/urxvt/perl/tabbedex: syntax error at /usr/lib/urxvt/perl/tabbedex line 669, near "$hook qw(start destroy user_command key_press property_notify add_lines)" syntax error at /usr/lib/urxvt/perl/tabbedex line 681, near "} }" --- tabbedex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabbedex b/tabbedex index ada0e2f..6e9fb6e 100755 --- a/tabbedex +++ b/tabbedex @@ -665,7 +665,7 @@ package urxvt::ext::tabbedex::tab; # simply proxies all interesting calls back to the tabbedex class. { - for my $hook qw(start destroy user_command key_press property_notify add_lines) { + for my $hook ( qw(start destroy user_command key_press property_notify add_lines) ) { eval qq{ sub on_$hook { my \$parent = \$_[0]{term}{parent} From 4cd01684ebb2113a2929c2739d5b0479b426bbf9 Mon Sep 17 00:00:00 2001 From: Mike Fisher Date: Mon, 12 Aug 2013 12:14:55 +0100 Subject: [PATCH 2/3] Add destroy tab with C-Down --- tabbedex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tabbedex b/tabbedex index 6e9fb6e..d2d1477 100755 --- a/tabbedex +++ b/tabbedex @@ -94,6 +94,9 @@ ## Use the following in your ~/.Xdefaults to enable: ## URXvt.tabbed.reopen-on-close: yes ## +## 17. Destroy a tab with C-Down +## +## Keysym reference http://www.tcl.tk/man/tcl8.4/TkCmd/keysyms.htm use Encode qw(decode); @@ -560,6 +563,11 @@ sub tab_key_press { $self->move_tab($tab, $keysym - 0xff52); return 1; } + elsif ($keysym == 0xff54) { + print "destroy\n"; + $tab->destroy; + return 1; + } } (); From 3bef3241c2509ac3a4d7899693d0d9f622935529 Mon Sep 17 00:00:00 2001 From: Mike Fisher Date: Mon, 12 Aug 2013 12:17:30 +0100 Subject: [PATCH 3/3] Remove testing output --- tabbedex | 1 - 1 file changed, 1 deletion(-) diff --git a/tabbedex b/tabbedex index d2d1477..4ec3ed9 100755 --- a/tabbedex +++ b/tabbedex @@ -564,7 +564,6 @@ sub tab_key_press { return 1; } elsif ($keysym == 0xff54) { - print "destroy\n"; $tab->destroy; return 1; }