mirror of
https://github.com/gryf/tabbedalt.git
synced 2025-12-17 11:30:31 +01:00
restored tab_property_notify hook
This commit is contained in:
23
README.rst
23
README.rst
@@ -2,8 +2,8 @@
|
||||
Tabbed
|
||||
======
|
||||
|
||||
This is modified tabbed extension for well known `urxvt-unicode
|
||||
<http://software.schmorp.de/pkg/rxvt-unicode.html>`_ terminal emulator
|
||||
This is modified tabbed extension for well known `urxvt-unicode`_ terminal
|
||||
emulator
|
||||
|
||||
Features
|
||||
--------
|
||||
@@ -13,7 +13,7 @@ Features
|
||||
under CTRL+SHIFT+N shortcut. After creating first custom shell this default
|
||||
will be discarded.
|
||||
|
||||
.. image:: https://raw.github.com/gryf/tabbed/master/screens/tabbed.png
|
||||
.. image:: screens/tabbed.png
|
||||
:alt: Named tabs
|
||||
|
||||
* Shortcuts can be attached to Super_L and Super_R keys together with others
|
||||
@@ -21,17 +21,14 @@ Features
|
||||
where *num* can be 0 to 9. CTRL+0 will switch to tenth tab.
|
||||
* Numbers in tabs can be switched off in by setting
|
||||
resource:``URxvt.tabbed.tab-numbers: false``
|
||||
* Integrated `activity indicator
|
||||
<http://mina86.com/2009/05/16/tabbed-urxvt-extension/>`_ with additional
|
||||
features like colors and different characters instead of simply asterisk
|
||||
depending on time.
|
||||
* Integrated `activity indicator`_ with additional features like colors and
|
||||
different characters instead of simply asterisk depending on time.
|
||||
|
||||
.. image:: https://raw.github.com/gryf/tabbed/master/screens/tabbed.gif
|
||||
.. image:: screens/tabbed.gif
|
||||
:alt: Indicator activity
|
||||
|
||||
* Integrated tab renaming from `stepb
|
||||
<http://github.com/stepb/urxvt-tabbedex>`_. Default under SHIFT+UP, then type
|
||||
some text and RETURN for accept, ESC for cancel.
|
||||
* Integrated tab renaming from `stepb`_. Default under SHIFT+UP, then type some
|
||||
text and RETURN for accept, ESC for cancel.
|
||||
|
||||
Installation
|
||||
------------
|
||||
@@ -106,3 +103,7 @@ After that invoke urxvt with perl extensions enabled::
|
||||
$ urxvt -pe tabbed
|
||||
|
||||
That's all.
|
||||
|
||||
.. _urxvt-unicode: http://software.schmorp.de/pkg/rxvt-unicode.html
|
||||
.. _activity indicator: http://mina86.com/2009/05/16/tabbed-urxvt-extension/
|
||||
.. _stepb: http://github.com/stepb/urxvt-tabbedex
|
||||
|
||||
27
tabbed
27
tabbed
@@ -90,12 +90,16 @@
|
||||
# [1] http://moc.daper.net
|
||||
#
|
||||
# 2011-07-12 21:05:26
|
||||
# - Fixed defaults for not defined tabcommands - now it is possible to use
|
||||
# - Fixed defaults for not defined tabcommands - now it is possible to use
|
||||
# tabbed just as described.
|
||||
# - Added some sort of primitive session ability, defined via resource
|
||||
# session, which should contain pipe separated shortcuts defined in tabcmds
|
||||
# resource. If there is no shortcuts (or wrong was defined), plain shell tab
|
||||
# - Added some sort of primitive session ability, defined via resource
|
||||
# session, which should contain pipe separated shortcuts defined in tabcmds
|
||||
# resource. If there is no shortcuts (or wrong was defined), plain shell tab
|
||||
# will appear.
|
||||
#
|
||||
# 2013-11-12 09:23:49
|
||||
# - Restored tab_property_notify hook. Whatever was the cause of the memory
|
||||
# consumption is gone or doesn't have anything to do with that function.
|
||||
|
||||
|
||||
sub tab_activity_mark ($$) {
|
||||
@@ -439,7 +443,7 @@ sub on_start {
|
||||
|
||||
# Ugly as hell ``session'' implementation
|
||||
my $count = 0;
|
||||
if (qx(ps x|grep urxvt|grep -v grep|wc -l) < 2 && scalar(@{$self->{session}})){
|
||||
if (qx(ps x|grep " urxvt "|grep -v grep|wc -l) < 2 && scalar(@{$self->{session}})){
|
||||
for my $item (@{$self->{session}}){
|
||||
if (exists($self->{tabcmds}{uc($item)})){
|
||||
$self->new_tab(@{$self->{tabcmds}{uc($item)}});
|
||||
@@ -543,7 +547,7 @@ sub tab_key_press {
|
||||
if(not %{$self->{tabcmds}}){
|
||||
print chr($keysym) . "\n";
|
||||
print chr($keysym) == "M". "\n";
|
||||
if ($keysym == 0x4e){
|
||||
if ($keysym == 0x4e){
|
||||
print "wtf?\n";
|
||||
$self->new_tab("shell");
|
||||
return 1;
|
||||
@@ -624,6 +628,14 @@ sub tab_add_lines {
|
||||
();
|
||||
}
|
||||
|
||||
sub tab_property_notify {
|
||||
my ($self, $tab, $event) = @_;
|
||||
|
||||
$self->copy_properties
|
||||
if $event->{window} == $tab->parent;
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
package urxvt::ext::tabbed::tab;
|
||||
|
||||
@@ -631,7 +643,7 @@ package urxvt::ext::tabbed::tab;
|
||||
# simply proxies all interesting calls back to the tabbed class.
|
||||
|
||||
{
|
||||
for my $hook qw(start destroy key_press add_lines) {
|
||||
for my $hook qw(start destroy key_press add_lines property_notify) {
|
||||
eval qq{
|
||||
sub on_$hook {
|
||||
my \$parent = \$_[0]{term}{parent}
|
||||
@@ -642,4 +654,3 @@ package urxvt::ext::tabbed::tab;
|
||||
die if $@;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user