]> git.sur5r.net Git - i3/i3/blobdiff - i3-wsbar
add socket path parameter to i3-wsbar script
[i3/i3] / i3-wsbar
index b1a50c40fd46a5131babf11d304dea06f7e463df..2f62edb4c4e187ada2b795327012750a6abdfa80 100755 (executable)
--- a/i3-wsbar
+++ b/i3-wsbar
@@ -12,7 +12,7 @@ use AnyEvent;
 use v5.10;
 
 my $stdin;
-my $i3 = i3;
+my $socket_path = undef;
 my ($workspaces, $outputs) = ([], {});
 my $last_line = "";
 
@@ -23,6 +23,7 @@ my $show_all = 0;
 
 my $result = GetOptions(
     'command=s' => \$command,
+    'socket=s' => \$socket_path,
     'input-on=s' => \$input_on,
     'output-on=s' => \$output_on,
     'show-all' => \$show_all,
@@ -35,6 +36,8 @@ if ($command eq '') {
     exit 1;
 }
 
+my $i3 = i3($socket_path);
+
 my @input_on = split(/,/, $input_on);
 my @output_on = split(/,/, $output_on);