Skip to content

Commit

Permalink
perltidy, bump to v1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
zdykstra committed Dec 1, 2022
1 parent 0545138 commit 2291cd3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ If the default option is acceptable, you do not need to define it again in a con
* `selector (default: rofi -dmenu -i)`: Define the menu command, used for picking a session / session action.
* `skipnw (default 0)`: Do not launch a new terminal when a new window is created in tmux.
* `ssh_args(default [])`: Additional arguments to add to each SSH connection.
* `ssh_prereqs(default[])`: An array of commands that is converted to a single shell command, run on the local host. If the exit code is 0, `tmuxc` will not launch the session.
* `swm (default 0)`: Enable single-window-mode. This is the traditional approach to tmux, it simply opens a terminal with your full tmux session attached in it. Refer to `on_connect` for session tuning (set status on, for example, if it's off by default.)
* `temp (default $HOME/.tmuxc/)`: The location of the runtime temp directory. While this can be changed on a per-host and per-session basis, it should be avoided. `tmuxc` uses a shared directory to discover other running instances and to insert commands into other running sessions. Unless a shared directory is used, instances will be 'lost' to each other.
* `terminal (default xterm)`: The default terminal to use when opening up new windows.
Expand Down
26 changes: 12 additions & 14 deletions tmuxc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
use strict;
use warnings;

our $VERSION = '1.8.1';
our $VERSION = '1.9';

use Getopt::Long qw(:config no_ignore_case auto_version);
use Time::HiRes qw( sleep gettimeofday );
use POSIX qw ( mkfifo setsid WNOHANG );
use FindBin qw ($RealScript $RealBin);
use Sys::Syslog qw(:standard :macros);
use Pod::Usage qw(pod2usage);
use Time::HiRes qw( sleep gettimeofday );
use POSIX qw ( mkfifo setsid WNOHANG );
use FindBin qw ($RealScript $RealBin);
use Sys::Syslog qw(:standard :macros);
use Pod::Usage qw(pod2usage);
use File::Basename;
use Sys::Hostname;
use IPC::Open2;
Expand Down Expand Up @@ -273,12 +273,12 @@ while (1) {
# Check if we have a ControlMaster session, create it if not
if ( defined($host) ) {

if ($config->{hosts}{$chost}{$sess}{ssh_prereqs}) {
if (CheckSSHPrereqs($host, $config->{hosts}{$chost}{$sess}{ssh_prereqs}) ) {
Log( LOG_DEBUG, "SSH Prereqs executed successfully" );
if ( $config->{hosts}{$chost}{$sess}{ssh_prereqs} ) {
if ( CheckSSHPrereqs( $host, $config->{hosts}{$chost}{$sess}{ssh_prereqs} ) ) {
Log( LOG_DEBUG, "SSH Prereqs executed successfully" );
} else {
Log( LOG_DEBUG, "Failed to execute SSH Prereqs for $host" );
exit;
Log( LOG_DEBUG, "Failed to execute SSH Prereqs for $host" );
exit;
}
}

Expand Down Expand Up @@ -654,9 +654,7 @@ sub CheckSSHPrereqs {

my $ssh_prereqs = shift;

my @cmd = buildCommand(
undef, $ssh_prereqs
);
my @cmd = buildCommand( undef, $ssh_prereqs );
Log( LOG_DEBUG, "Checking SSH Prereqs for $host" );
Log( LOG_DEBUG, join( ' ', @cmd ) );
qx(@cmd);
Expand Down

0 comments on commit 2291cd3

Please sign in to comment.