diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-01-14 17:35:01 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-01-14 17:35:01 +0000 |
commit | 7dcda7d25202c7a78a6f78cd28b90d03e5bdd4c2 (patch) | |
tree | d0e9409c4f8ce530a4419c01b57244aa98e81fa1 | |
parent | d8bff5bbe30026a15c6f7e085ba9eb337ec18873 (diff) | |
download | dotfiles-7dcda7d25202c7a78a6f78cd28b90d03e5bdd4c2.tar.gz |
i3status-wrapper: add some additional checks we're on a managed ws
-rwxr-xr-x | scripts/desktop/i3status-wrapper | 7 |
1 files 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 => [] }; |