0

Trigger "button" boreder repaint only on new/closed window event

This commit is contained in:
eleksir
2023-05-08 19:30:55 +03:00
parent 5977c933a7
commit 7a8316992a

View File

@@ -126,6 +126,9 @@ my $i3_subscription->{window} = sub {
}
}
}
} else {
# we just don't care about other events now
return;
}
active_win_borders ();
@@ -165,45 +168,16 @@ sub add_events () {
if ($UPDATE) {
my $jsonobj;
if ($CONF->{app_buttons}) {
@{$jsonobj} = @{$O->{apps}};
}
if ($CONF->{capslock}->{enabled}) {
push @{$jsonobj}, $O->{capslock};
}
if ($CONF->{cpu_temp}->{enabled}) {
push @{$jsonobj}, $O->{cputemp};
}
if ($CONF->{mem}) {
push @{$jsonobj}, $O->{mem};
}
if ($CONF->{la}) {
push @{$jsonobj}, $O->{la};
}
if ($CONF->{vpn}->{enabled}) {
push @{$jsonobj}, $O->{vpn};
}
if ($CONF->{'net-if'}->{enabled}) {
push @{$jsonobj}, $O->{interfaces};
}
if ($CONF->{battery}->{enabled}) {
push @{$jsonobj}, $O->{battery};
}
if ($CONF->{'simple-volume-pa'}) {
push @{$jsonobj}, $O->{'simple-volume-pa'};
}
if ($CONF->{clock}->{enabled}) {
push @{$jsonobj}, $O->{wallclock};
}
@{$jsonobj} = @{$O->{apps}} if $CONF->{app_buttons};
push @{$jsonobj}, $O->{capslock} if $CONF->{capslock}->{enabled};
push @{$jsonobj}, $O->{cputemp} if $CONF->{cpu_temp}->{enabled};
push @{$jsonobj}, $O->{mem} if $CONF->{mem};
push @{$jsonobj}, $O->{la} if $CONF->{la};
push @{$jsonobj}, $O->{vpn} if $CONF->{vpn}->{enabled};
push @{$jsonobj}, $O->{interfaces} if $CONF->{'net-if'}->{enabled};
push @{$jsonobj}, $O->{battery} if $CONF->{battery}->{enabled};
push @{$jsonobj}, $O->{'simple-volume-pa'} if $CONF->{'simple-volume-pa'};
push @{$jsonobj}, $O->{wallclock} if $CONF->{clock}->{enabled};
my $output_string = eval { encode_json $jsonobj };