sub run_command {
- my ($screen, $config, $cmd) = @_;
+ my ($screen, $cmd) = @_;
$screen->debug('run_command', "running @{$cmd}");
# GNU screen displays an annoying "Slurping X characters into buffer".
# Use 'msgwait 0' as a hack to disable it.
my $msgwait = $config->{setting}{screen_msgwait};
- run_command($screen, $config, ['screen', '-X', 'msgwait', 0]);
- run_command($screen, $config, ['screen', '-X', 'readbuf', $tmp]);
- run_command($screen, $config, ['screen', '-X', 'msgwait', $msgwait]);
+ run_command($screen, ['screen', '-X', 'msgwait', 0]);
+ run_command($screen, ['screen', '-X', 'readbuf', $tmp]);
+ run_command($screen, ['screen', '-X', 'msgwait', $msgwait]);
} elsif ($config->{setting}{multiplexer} eq 'tmux') {
$screen->debug('handler_yank', 'using tmux');
- run_command($screen, $config, ['tmux', 'load-buffer', $tmp]);
+ run_command($screen, ['tmux', 'load-buffer', $tmp]);
} else {
die 'unsupported multiplexer';
}
# Sleep until we switch back to the current window.
Time::HiRes::usleep($config->{setting}{paste_sleep});
- run_command($screen, $config, \@cmd);
+ run_command($screen, \@cmd);
});
return;
}
run_in_background($screen, sub {
my @cmd = ( @{$config->{setting}{browser}}, $match->{value} );
- run_command($screen, $config, \@cmd);
+ run_command($screen, \@cmd);
});
return;
}
if ($match->{value} =~ m{^https://www.youtube.com/}) {
return run_in_background($screen, sub {
- run_command($screen, $config,
- ['youtube-dl-wrapper', $match->{value}]);
+ run_command($screen, ['youtube-dl-wrapper', $match->{value}]);
});
}
handler_url(@_);