mirror of
https://github.com/gryf/tabbedalt.git
synced 2025-12-17 11:30:31 +01:00
Workaround for memory consumption in copying X properties.
This commit is contained in:
54
tabbed
54
tabbed
@@ -43,36 +43,51 @@
|
|||||||
# (http://github.com/stepb/urxvt-tabbedex)
|
# (http://github.com/stepb/urxvt-tabbedex)
|
||||||
#
|
#
|
||||||
# 2010-08-12 20:54:46
|
# 2010-08-12 20:54:46
|
||||||
# - Added functionality to create definitions of custom shells as a X resource,
|
# - Added functionality to create definitions of custom shells as a X resource,
|
||||||
# under common tabcmds name. This functionality also deprecates feature called
|
# under common tabcmds name. This functionality also deprecates feature called
|
||||||
# here as a predefined actions. Without any configuration only simple shell is
|
# here as a predefined actions. Without any configuration only simple shell is
|
||||||
# available under CTRL+SHIFT+N shortcut. After creating first custom shell this
|
# available under CTRL+SHIFT+N shortcut. After creating first custom shell this
|
||||||
# default is not available.
|
# default is not available.
|
||||||
#
|
#
|
||||||
# Let's assume, that one want to mimic previous configuration, that means three
|
# Let's assume, that one want to mimic previous configuration, that means three
|
||||||
# kind of custom shells: simple one (default shell in the system), midnight
|
# kind of custom shells: simple one (default shell in the system), midnight
|
||||||
# commander and root (namely - su command). Three resources should be created:
|
# commander and root (namely - su command). Three resources should be created:
|
||||||
#
|
#
|
||||||
# URxvt.tabbed.tabcmds.1: N|shell
|
# URxvt.tabbed.tabcmds.1: N|shell
|
||||||
# URxvt.tabbed.tabcmds.2: R|root|su -
|
# URxvt.tabbed.tabcmds.2: R|root|su -
|
||||||
# URxvt.tabbed.tabcmds.3: M|mc|mc
|
# URxvt.tabbed.tabcmds.3: M|mc|mc
|
||||||
#
|
#
|
||||||
# URxvt.tabbed.tabcmds.[number] is a ordinal number, started from 1. There
|
# URxvt.tabbed.tabcmds.[number] is a ordinal number, started from 1. There
|
||||||
# shouldn't be gaps between numbers, otherwise custom shells defined after a gap
|
# shouldn't be gaps between numbers, otherwise custom shells defined after a gap
|
||||||
# will not work.
|
# will not work.
|
||||||
#
|
#
|
||||||
# Resource values are two or three pipe separated values, which are in order:
|
# Resource values are two or three pipe separated values, which are in order:
|
||||||
# - shortcut key, which will be used for invoking custom shell together with
|
# - shortcut key, which will be used for invoking custom shell together with
|
||||||
# CTRL+SHIFT keys. Mod4 (aka Super or Windows key) are not supported, and most
|
# CTRL+SHIFT keys. Mod4 (aka Super or Windows key) are not supported, and most
|
||||||
# probably will be removed from script soon, as lots of window managers out
|
# probably will be removed from script soon, as lots of window managers out
|
||||||
# there make a big use of those keys.
|
# there make a big use of those keys.
|
||||||
# Note: There is limitation for characters used as a shortcut. Because some of
|
# Note: There is limitation for characters used as a shortcut. Because some of
|
||||||
# them are used for control terminal itself (i.e. CTRL+SHIFT+D may not work), and
|
# them are used for control terminal itself (i.e. CTRL+SHIFT+D may not work), and
|
||||||
# also other characters (digits, some special characters etc.). Letters are
|
# also other characters (digits, some special characters etc.). Letters are
|
||||||
# case insensitive.
|
# case insensitive.
|
||||||
# - name of the tab, it could be anything but the pipe.
|
# - name of the tab, it could be anything but the pipe.
|
||||||
# - optional command. If omitted, simple shell will be launched.
|
# - optional command. If omitted, simple shell will be launched.
|
||||||
#
|
#
|
||||||
|
# 2010-08-28 10:17:02
|
||||||
|
# - Removed tab_property_notify hook, because in certain circumstances it
|
||||||
|
# provides memory consumption. It is especially well seen by running
|
||||||
|
# mocp[1] and play internet radio station (i.e digitalgunfire.com, but
|
||||||
|
# there can be others). Observe memory taken by urxvt with top or ps. Also,
|
||||||
|
# original tabbed extension is affected.
|
||||||
|
#
|
||||||
|
# This change will affect i.e. dynamic font change - it will not expand window
|
||||||
|
# to reflect size of a font. Switching to next tab and back will rearrange
|
||||||
|
# content of a tab to current window size.
|
||||||
|
#
|
||||||
|
# If anyone have a better idea how to fix memory consumption which is taking
|
||||||
|
# place in copy_properties(), please step forward :)
|
||||||
|
#
|
||||||
|
# [1] http://moc.daper.net
|
||||||
|
|
||||||
|
|
||||||
sub tab_activity_mark ($$) {
|
sub tab_activity_mark ($$) {
|
||||||
@@ -545,15 +560,6 @@ sub tab_key_press {
|
|||||||
();
|
();
|
||||||
}
|
}
|
||||||
|
|
||||||
sub tab_property_notify {
|
|
||||||
my ($self, $tab, $event) = @_;
|
|
||||||
|
|
||||||
$self->copy_properties
|
|
||||||
if $event->{window} == $tab->parent;
|
|
||||||
|
|
||||||
();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sub tab_add_lines {
|
sub tab_add_lines {
|
||||||
my ($self, $tab) = @_;
|
my ($self, $tab) = @_;
|
||||||
@@ -570,7 +576,7 @@ package urxvt::ext::tabbed::tab;
|
|||||||
# simply proxies all interesting calls back to the tabbed class.
|
# simply proxies all interesting calls back to the tabbed class.
|
||||||
|
|
||||||
{
|
{
|
||||||
for my $hook qw(start destroy key_press property_notify add_lines) {
|
for my $hook qw(start destroy key_press add_lines) {
|
||||||
eval qq{
|
eval qq{
|
||||||
sub on_$hook {
|
sub on_$hook {
|
||||||
my \$parent = \$_[0]{term}{parent}
|
my \$parent = \$_[0]{term}{parent}
|
||||||
|
|||||||
Reference in New Issue
Block a user