From 7dcda7d25202c7a78a6f78cd28b90d03e5bdd4c2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 14 Jan 2024 17:35:01 +0000 Subject: i3status-wrapper: add some additional checks we're on a managed ws --- scripts/desktop/i3status-wrapper | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/desktop/i3status-wrapper b/scripts/desktop/i3status-wrapper index cbfa3685..7b6087b4 100755 --- a/scripts/desktop/i3status-wrapper +++ b/scripts/desktop/i3status-wrapper @@ -109,7 +109,8 @@ unless (fork // warn "couldn't fork monitoring loop") { # We have to go round the loop once more to find out if it's # just a floating dialog that we'll ignore. $last_e = $e; - } elsif ($e->{change} && $e->{change} eq "floating" + } elsif ($e->{change} && exists $info{paper_ws}{$info{focused_ws}} + && $e->{change} eq "floating" && $e->{container}{type} ne "floating_con") { # A container stopped floating -- it's as though it's new. new_container($e); @@ -189,8 +190,8 @@ unless (fork // warn "couldn't fork monitoring loop") { # Workspace changes elsif ($e->{change} && $e->{change} eq "focus" && $e->{current}) { $info{focused_ws} = $e->{current}{id}; - } elsif ($e->{change} && $e->{change} eq "init" - && $e->{current}) { + } elsif ($e->{change} && $e->{change} eq "init" && $e->{current} + && grep $_ eq $e->{current}{name}, @all_workspaces) { $info{paper_ws}{$e->{current}{id}} = { off_left => [], off_right => [], ncols => 2, cols => [] }; -- cgit v1.2.3