From: Michael Stapelberg Date: Wed, 3 Aug 2011 01:54:00 +0000 (+0200) Subject: i3-wsbar: display a separator between workspaces for every output when --show-all... X-Git-Tag: 4.0.2~58^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6ad00b1dffb437db0631c5db600adb4386b4c4f7;p=i3%2Fi3 i3-wsbar: display a separator between workspaces for every output when --show-all is used (Thanks marforio) Fixes #417 --- diff --git a/i3-wsbar b/i3-wsbar index 2d546a73..a485c150 100755 --- a/i3-wsbar +++ b/i3-wsbar @@ -167,14 +167,23 @@ sub output_change { sub update_output { my $dzen_bg = "#111111"; my $out; + my $previous_output; for my $name (keys %{$outputs}) { my $width = $outputs->{$name}->{rect}->{width}; + $previous_output = undef; $out = qq|^pa(;2)|; for my $ws (@{$workspaces}) { next if $ws->{output} ne $name and !$show_all; + # Display a separator if we are on a different output now + if (defined($previous_output) and + ($ws->{output} ne $previous_output)) { + $out .= qq|^fg(#900000)^ib(1)\|^ib(0)^p(+4)|; + } + $previous_output = $ws->{output}; + my ($bg, $fg) = qw(333333 888888); ($bg, $fg) = qw(4c7899 ffffff) if $ws->{visible}; ($bg, $fg) = qw(900000 ffffff) if $ws->{urgent};