From 1bf9362a2f93c35ce1bbf03bcc2998e2a9e40738 Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 12 Dec 2018 21:25:40 +0100 Subject: [PATCH] Session: removed one unnecessary grep from check Currently, there was a command used: ps x|grep " urxvt "|grep -v grep|wc -l which was checking if there is only one instance of urxvt during start, so that it will be possible to initialize session. The `grep -v grep` is in excess. This patch is fixing that. --- tabbed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabbed b/tabbed index a362254..78513ec 100644 --- a/tabbed +++ b/tabbed @@ -445,7 +445,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 "|wc -l) < 2 && scalar(@{$self->{session}})){ for my $item (@{$self->{session}}){ if (exists($self->{tabcmds}{uc($item)})){ $self->new_tab(@{$self->{tabcmds}{uc($item)}});