1
0
mirror of https://github.com/gryf/tabbedalt.git synced 2025-12-17 19:40:31 +01:00

Removed session management.

I doubt, that it is useful feature, I've never got bug report about it,
and I'm not using it anyway.
This commit is contained in:
2022-02-14 17:07:11 +01:00
parent 317af4fe06
commit 87205cc3eb
2 changed files with 4 additions and 32 deletions

View File

@@ -180,17 +180,6 @@ like::
URxvt.tabbedalt.tabcmds.3: M|mc|mc URxvt.tabbedalt.tabcmds.3: M|mc|mc
URxvt.tabbedalt.tabcmds.4: S|shell URxvt.tabbedalt.tabcmds.4: S|shell
Startup tabs
------------
There is possibility to tell tabbedalt which tabs should be auto started during
first window launch. First, you'll need to have some custom tab commands.
Let's assume, that there are already defined three custom shells, like in
section above. If one wanted to start shell, mc and root session, following
line should be placed in ``~/.Xdefaults``::
URxvt.tabbedalt.session: S|M|R
Renaming tabs Renaming tabs
------------- -------------

View File

@@ -115,6 +115,9 @@
# (SHIFT+Down). It can be disabled by an option "disable-shift-down". More # (SHIFT+Down). It can be disabled by an option "disable-shift-down". More
# information in README. # information in README.
# - Cleaned up a bit the code and comments. # - Cleaned up a bit the code and comments.
#
# 2022-02-14 17:03:52
# - Removed "session" management
sub tab_activity_mark ($$) { sub tab_activity_mark ($$) {
my ($self, $tab) = @_; my ($self, $tab) = @_;
@@ -439,8 +442,6 @@ sub on_init {
} }
} }
@{$self->{session}} = split('\|', $self->x_resource("session")) or ();
(); ();
} }
@@ -458,25 +459,7 @@ sub on_start {
shift @argv; shift @argv;
} while @argv && $argv[0] ne "-e"; } while @argv && $argv[0] ne "-e";
# Ugly as hell ``session'' implementation $self->_new_tab ("shell", @argv);
if (!(@argv) && (qx(ps x|grep "[ ]urxvt\$"|wc -l) < 2) && scalar(@{$self->{session}})){
my $count = 0;
my @command;
for my $item (@{$self->{session}}){
if (exists($self->{tabcmds}{uc($item)})) {
$self->_new_tab(@{$self->{tabcmds}{uc($item)}});
$count++;
}
}
if ($count == 0) {
# no keys was valid, failsafe shell.
$self->_new_tab ("shell", @argv);
}
} else {
$self->_new_tab ("shell", @argv);
}
if (defined $self->{timeouts}) { if (defined $self->{timeouts}) {
my $interval = ($self->{timeouts}[@{ $self->{timeouts} } - 1]->[0]); my $interval = ($self->{timeouts}[@{ $self->{timeouts} } - 1]->[0]);