greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

Focused window block stuck on Alacritty #786

Closed amitlevy21 closed 4 years ago

amitlevy21 commented 4 years ago

Hey,

The block focused window keeps showing the same window name regardless which window is focused: image

Here is the config I'm using:

[theme]
name = "solarized-dark"

[theme.overrides]
idle_fg = "#FFFFFF"
alternating_tint_bg = "#0088CC"

[icons]
name = "awesome5"

[icons.overrides]
net_wired = ""
net_wireless = ""

[[block]]
block = "music"
player = "spotify"
buttons = ["prev", "play", "next"]

[[block]]
block = "focused_window"
max_width = 21

[[block]]
block = "disk_space"
path = "/home"
alias = ""
info_type = "available"
unit = "GB"
interval = 20
warning = 5.0
alert = 2.0

[[block]]
block = "memory"
display_type = "memory"
format_mem = "{Mup}%"
format_swap = "{SUp}%"

[[block]]
block = "cpu"
interval = 1

[[block]]
block = "net"
device = "wlp0s26u1u5"
speed_up = true
speed_down = true
interval = 5

[[block]]
block = "sound"

[[block]]
block = "time"
interval = 60
format = "%a %d/%m %R"

It reproduces with a minimal config:

[theme]
name = "solarized-dark"

[icons]
name = "awesome5"

[[block]]
block = "focused_window"
max_width = 21

The issue happens only with Alacritty terminal and only when the following setting is set in alacritty.yml:

dynamic_title: false

Which does not change the window name of Alacritty when running a command. For example, it doesn't change the window name from 'Alacritty' to yay when running the yay command from the terminal.

I don't know how alacritty achieves this feature.

Here is the output of xprop and clicking the terminal window:

WM_HINTS(WM_HINTS):
_NET_WM_DESKTOP(CARDINAL) = 1
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING
_NET_WM_ICON(CARDINAL) =
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified size: 800 by 600
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
WM_CLIENT_MACHINE(STRING) = "amit-pc"
_NET_WM_PID(CARDINAL) = 27638
WM_CLASS(STRING) = "Alacritty", "Alacritty"
XdndAware(ATOM) = BITMAP
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
_NET_WM_NAME(UTF8_STRING) = "Alacritty"
WM_NAME(STRING) = "Alacritty"

Here is, for example, xprop + google's chrome which shows a different WM_CLASS(STRING) value

_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 2
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 20971522, 20971523
WM_WINDOW_ROLE(STRING) = "browser"
WM_CLASS(STRING) = "google-chrome", "Google-chrome"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 3996
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "amit-pc"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING, _NET_WM_SYNC_REQUEST

Am I missing something here?

Thank you for your time

amitlevy21 commented 4 years ago

The problem is temporary fix if I restart i3, but comes back if I open Alacritty and run a command

ammgws commented 4 years ago

Hmm I can't seem to reproduce.

Using i3status-rust git master Sway-git (don't have an i3 setup atm) Alacritty with dynamic title turned off

If I open two alacritty terminals then of course the displayed title does not change because we set dynamic title to off in the alacritty config. However if you run i3status-rust in a terminal you can see that it is correctly reacting to the focus change events.

If I open alacritty and Firefox then the title changes as per expected

amitlevy21 commented 4 years ago

I managed to get the same response as you did. But if you try the following:

  1. Run i3status-rs in the terminal
  2. Open Alacritty
  3. At this point i3status-rs responds to focus change events.
  4. Run a command in the opened Alacritty terminal (I ran yay)
  5. Now i3status-rs in the other terminal is not responding for focused change events

If you terminate i3status-rs and re run it, it will start to respond to event changes again, until you open Alacritty, and run a command.

ammgws commented 4 years ago
  1. Opened firefox in a new workspace
  2. Opened Alacritty in that workspace
  3. Ran i3status-rs in that terminal
  4. Opened another Alacritty
  5. Ran a command (yes)

Couldn't reproduce :confused:

issue768-1

amitlevy21 commented 4 years ago

OK, so it turns out that the trigger to the issue here is the auto type of keepassxc. The yay command i was running requires root privileges and I use keepassxc to enter my sudo password. It is after the sudo password is auto typed, that i3status-rs loses access to focus events.

  1. Trying to break things with yes command - i3status-rs responds to focus events.
  2. Trying to breaks things with ls and sudo, I type the sudo password manually - i3status-rs responds to focus events.
  3. Same as 2 but this time I use keepassxc auto type feature to auto type sudo password - i3status-rs doesn't respond to focus events.
ammgws commented 4 years ago

I suspect this is the same issue as described in https://github.com/greshake/i3status-rust/pull/778

amitlevy21 commented 4 years ago

I've subscribe to that PR and will test again once it's merged. Thank you!

ammgws commented 4 years ago

You can test it now if you want:

git clone https://github.com/ammgws/i3status-rust
cd i3status-rust
git switch x11fail
cargo build
./target/debug/i3status-rs
amitlevy21 commented 4 years ago

It didn't fix it for me

ammgws commented 4 years ago

OK back to troubleshooting then

No errors show up when running it on a terminal?

amitlevy21 commented 4 years ago

./target/debug/i3status-rs $HOME/.config/i3/status.toml returns no errors

amitlevy21 commented 4 years ago

OK i got something. Once I trigger keepassxc auto type window i get this:

thread 'focused_window' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid type: integer `29360136`, expected a string", line: 1, column: 695)', src/blocks/focused_window.rs:81:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ammgws commented 4 years ago

Even when using keepassxc auto type feature to auto type sudo password?

I might have to setup keepass and i3 (since the autotype probably doesn't work on sway) to see what's going on...

amitlevy21 commented 4 years ago

And with RUST_BACKTRACE=1:

thread 'focused_window' panicked at 'called `Result::unwrap()` on an `Err` value: Error("invalid type: integer `29360136`, expected a string", line: 1, column: 695)

   0: failure::backtrace::internal::InternalBacktrace::new
             at .local/share/cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.8/src/backtrace/internal.rs:46
   1: failure::backtrace::Backtrace::new
             at .local/share/cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.8/src/backtrace/mod.rs:121
   2: <failure::error::error_impl::ErrorImpl as core::convert::From<F>>::from
             at .local/share/cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.8/src/error/error_impl.rs:19
   3: <failure::error::Error as core::convert::From<F>>::from
             at .local/share/cargo/registry/src/github.com-1ecc6299db9ec823/failure-0.1.8/src/error/mod.rs:36
   4: swayipc::event::<impl core::convert::TryFrom<(u32,alloc::vec::Vec<u8>)> for swayipc::reply::Event>::try_from
             at .local/share/cargo/git/checkouts/swayipc-rs-79f6b255b4d58810/1c7896b/src/event.rs:33
   5: core::ops::function::FnOnce::call_once
             at /build/rust/src/rustc-1.45.2-src/src/libcore/ops/function.rs:232
   6: core::result::Result<T,E>::and_then
             at /build/rust/src/rustc-1.45.2-src/src/libcore/result.rs:729
   7: <swayipc::sync::event::EventIterator as core::iter::traits::iterator::Iterator>::next
             at .local/share/cargo/git/checkouts/swayipc-rs-79f6b255b4d58810/1c7896b/src/sync/event.rs:13
   8: <i3status_rs::blocks::focused_window::FocusedWindow as i3status_rs::blocks::ConfigBlock>::new::{{closure}}
             at Dev/i3status-rust/src/blocks/focused_window.rs:76
   9: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /build/rust/src/rustc-1.45.2-src/src/libstd/sys_common/backtrace.rs:130
  10: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
             at /build/rust/src/rustc-1.45.2-src/src/libstd/thread/mod.rs:475
  11: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /build/rust/src/rustc-1.45.2-src/src/libstd/panic.rs:318
  12: std::panicking::try::do_call
             at /build/rust/src/rustc-1.45.2-src/src/libstd/panicking.rs:297
  13: __rust_try
  14: std::panicking::try
             at /build/rust/src/rustc-1.45.2-src/src/libstd/panicking.rs:274
  15: std::panic::catch_unwind
             at /build/rust/src/rustc-1.45.2-src/src/libstd/panic.rs:394
  16: std::thread::Builder::spawn_unchecked::{{closure}}
             at /build/rust/src/rustc-1.45.2-src/src/libstd/thread/mod.rs:474
  17: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /build/rust/src/rustc-1.45.2-src/src/libcore/ops/function.rs:232
  18: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /build/rust/src/rustc-1.45.2-src/src/liballoc/boxed.rs:1076
      <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /build/rust/src/rustc-1.45.2-src/src/liballoc/boxed.rs:1076
      std::sys::unix::thread::Thread::new::thread_start
             at /build/rust/src/rustc-1.45.2-src/src/libstd/sys/unix/thread.rs:87
  19: start_thread
  20: __clone
', src/blocks/focused_window.rs:81:27
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /build/rust/src/rustc-1.45.2-src/vendor/backtrace/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /build/rust/src/rustc-1.45.2-src/vendor/backtrace/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:486
  11: rust_begin_unwind
             at src/libstd/panicking.rs:388
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:101
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1272
  14: core::result::Result<T,E>::unwrap
             at /build/rust/src/rustc-1.45.2-src/src/libcore/result.rs:1005
  15: <i3status_rs::blocks::focused_window::FocusedWindow as i3status_rs::blocks::ConfigBlock>::new::{{closure}}
             at src/blocks/focused_window.rs:81
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
ammgws commented 4 years ago

Awesome, that brings us one step closer.

ammgws commented 4 years ago

Are you able to run i3-msg -t get_tree while the keepass window is open?

Need to see which field it is which is causing the deserislisation to fail.

amitlevy21 commented 4 years ago

Yes, here is the output.

I always have the keepassxc window in the scratchpad area, but I still get the error even if the window isn't in the scratchpad area.

{
    "id":94052927869648,
    "type":"root",
    "orientation":"horizontal",
    "scratchpad_state":"none",
    "percent":1.0,
    "urgent":false,
    "focused":false,
    "layout":"splith",
    "workspace_layout":"default",
    "last_split_layout":"splith",
    "border":"pixel",
    "current_border_width":-1,
    "rect":{
        "x":0,
        "y":0,
        "width":1920,
        "height":1080
    },
    "deco_rect":{
        "x":0,
        "y":0,
        "width":0,
        "height":0
    },
    "window_rect":{
        "x":0,
        "y":0,
        "width":0,
        "height":0
    },
    "geometry":{
        "x":0,
        "y":0,
        "width":0,
        "height":0
    },
    "name":"root",
    "window":null,
    "window_type":null,
    "nodes":[
        {
            "id":94052927872288,
            "type":"output",
            "orientation":"none",
            "scratchpad_state":"none",
            "percent":0.5,
            "urgent":false,
            "focused":false,
            "layout":"output",
            "workspace_layout":"default",
            "last_split_layout":"splith",
            "border":"pixel",
            "current_border_width":-1,
            "rect":{
                "x":0,
                "y":0,
                "width":1920,
                "height":1080
            },
            "deco_rect":{
                "x":0,
                "y":0,
                "width":0,
                "height":0
            },
            "window_rect":{
                "x":0,
                "y":0,
                "width":0,
                "height":0
            },
            "geometry":{
                "x":0,
                "y":0,
                "width":0,
                "height":0
            },
            "name":"__i3",
            "window":null,
            "window_type":null,
            "nodes":[
                {
                    "id":94052927872800,
                    "type":"con",
                    "orientation":"horizontal",
                    "scratchpad_state":"none",
                    "percent":1.0,
                    "urgent":false,
                    "focused":false,
                    "output":"__i3",
                    "layout":"splith",
                    "workspace_layout":"default",
                    "last_split_layout":"splith",
                    "border":"pixel",
                    "current_border_width":-1,
                    "rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "deco_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "window_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "geometry":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "name":"content",
                    "window":null,
                    "window_type":null,
                    "nodes":[
                        {
                            "id":94052927873312,
                            "type":"workspace",
                            "orientation":"none",
                            "scratchpad_state":"none",
                            "percent":1.0,
                            "urgent":false,
                            "focused":false,
                            "output":"__i3",
                            "layout":"splith",
                            "workspace_layout":"default",
                            "last_split_layout":"splith",
                            "border":"pixel",
                            "current_border_width":-1,
                            "rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "deco_rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "window_rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "geometry":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "name":"__i3_scratch",
                            "num":-1,
                            "gaps":{
                                "inner":0,
                                "outer":0,
                                "top":0,
                                "right":0,
                                "bottom":0,
                                "left":0
                            },
                            "window":null,
                            "window_type":null,
                            "nodes":[

                            ],
                            "floating_nodes":[
                                {
                                    "id":94052927873824,
                                    "type":"floating_con",
                                    "orientation":"horizontal",
                                    "scratchpad_state":"fresh",
                                    "percent":null,
                                    "urgent":false,
                                    "focused":false,
                                    "output":"__i3",
                                    "layout":"splith",
                                    "workspace_layout":"default",
                                    "last_split_layout":"splith",
                                    "border":"pixel",
                                    "current_border_width":-1,
                                    "rect":{
                                        "x":484,
                                        "y":151,
                                        "width":960,
                                        "height":810
                                    },
                                    "deco_rect":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "window_rect":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "geometry":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "name":null,
                                    "window":null,
                                    "window_type":null,
                                    "nodes":[
                                        {
                                            "id":94052927874304,
                                            "type":"con",
                                            "orientation":"none",
                                            "scratchpad_state":"none",
                                            "percent":1.0,
                                            "urgent":false,
                                            "focused":false,
                                            "output":"__i3",
                                            "layout":"splith",
                                            "workspace_layout":"default",
                                            "last_split_layout":"splith",
                                            "border":"pixel",
                                            "current_border_width":2,
                                            "rect":{
                                                "x":484,
                                                "y":151,
                                                "width":960,
                                                "height":810
                                            },
                                            "deco_rect":{
                                                "x":0,
                                                "y":0,
                                                "width":0,
                                                "height":0
                                            },
                                            "window_rect":{
                                                "x":2,
                                                "y":2,
                                                "width":956,
                                                "height":806
                                            },
                                            "geometry":{
                                                "x":484,
                                                "y":151,
                                                "width":956,
                                                "height":806
                                            },
                                            "name":"Keepass2Android Password Database - KeePassXC",
                                            "window":29360134,
                                            "window_type":"normal",
                                            "window_properties":{
                                                "class":"KeePassXC",
                                                "instance":"keepassxc",
                                                "title":"Keepass2Android Password Database - KeePassXC",
                                                "transient_for":null
                                            },
                                            "nodes":[

                                            ],
                                            "floating_nodes":[

                                            ],
                                            "focus":[

                                            ],
                                            "fullscreen_mode":0,
                                            "sticky":false,
                                            "floating":"user_on",
                                            "swallows":[

                                            ]
                                        }
                                    ],
                                    "floating_nodes":[

                                    ],
                                    "focus":[
                                        94052927874304
                                    ],
                                    "fullscreen_mode":0,
                                    "sticky":false,
                                    "floating":"auto_off",
                                    "swallows":[

                                    ]
                                }
                            ],
                            "focus":[
                                94052927873824
                            ],
                            "fullscreen_mode":1,
                            "sticky":false,
                            "floating":"auto_off",
                            "swallows":[

                            ]
                        }
                    ],
                    "floating_nodes":[

                    ],
                    "focus":[
                        94052927873312
                    ],
                    "fullscreen_mode":0,
                    "sticky":false,
                    "floating":"auto_off",
                    "swallows":[

                    ]
                }
            ],
            "floating_nodes":[

            ],
            "focus":[
                94052927872800
            ],
            "fullscreen_mode":0,
            "sticky":false,
            "floating":"auto_off",
            "swallows":[

            ]
        },
        {
            "id":94052927888048,
            "type":"output",
            "orientation":"none",
            "scratchpad_state":"none",
            "percent":0.5,
            "urgent":false,
            "focused":false,
            "layout":"output",
            "workspace_layout":"default",
            "last_split_layout":"splith",
            "border":"pixel",
            "current_border_width":-1,
            "rect":{
                "x":0,
                "y":0,
                "width":1920,
                "height":1080
            },
            "deco_rect":{
                "x":0,
                "y":0,
                "width":0,
                "height":0
            },
            "window_rect":{
                "x":0,
                "y":0,
                "width":0,
                "height":0
            },
            "geometry":{
                "x":0,
                "y":0,
                "width":0,
                "height":0
            },
            "name":"HDMI1",
            "window":null,
            "window_type":null,
            "nodes":[
                {
                    "id":94052927888560,
                    "type":"dockarea",
                    "orientation":"none",
                    "scratchpad_state":"none",
                    "percent":0.33333333333333331483,
                    "urgent":false,
                    "focused":false,
                    "output":"HDMI1",
                    "layout":"dockarea",
                    "workspace_layout":"default",
                    "last_split_layout":"splith",
                    "border":"pixel",
                    "current_border_width":-1,
                    "rect":{
                        "x":0,
                        "y":0,
                        "width":1920,
                        "height":25
                    },
                    "deco_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "window_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "geometry":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "name":"topdock",
                    "window":null,
                    "window_type":null,
                    "nodes":[
                        {
                            "id":94052927931696,
                            "type":"con",
                            "orientation":"none",
                            "scratchpad_state":"none",
                            "percent":1.0,
                            "urgent":false,
                            "focused":false,
                            "output":"HDMI1",
                            "layout":"splith",
                            "workspace_layout":"default",
                            "last_split_layout":"splith",
                            "border":"pixel",
                            "current_border_width":2,
                            "rect":{
                                "x":0,
                                "y":0,
                                "width":1920,
                                "height":25
                            },
                            "deco_rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "window_rect":{
                                "x":0,
                                "y":0,
                                "width":1920,
                                "height":25
                            },
                            "geometry":{
                                "x":0,
                                "y":1055,
                                "width":1920,
                                "height":25
                            },
                            "name":"i3bar for output HDMI1",
                            "window":58720262,
                            "window_type":"unknown",
                            "window_properties":{
                                "class":"i3bar",
                                "instance":"i3bar",
                                "title":"i3bar for output HDMI1",
                                "transient_for":null
                            },
                            "nodes":[

                            ],
                            "floating_nodes":[

                            ],
                            "focus":[

                            ],
                            "fullscreen_mode":0,
                            "sticky":false,
                            "floating":"auto_off",
                            "swallows":[

                            ]
                        }
                    ],
                    "floating_nodes":[

                    ],
                    "focus":[
                        94052927931696
                    ],
                    "fullscreen_mode":0,
                    "sticky":false,
                    "floating":"auto_off",
                    "swallows":[
                        {
                            "dock":2,
                            "insert_where":2
                        }
                    ]
                },
                {
                    "id":94052927891712,
                    "type":"con",
                    "orientation":"horizontal",
                    "scratchpad_state":"none",
                    "percent":0.33333333333333331483,
                    "urgent":false,
                    "focused":false,
                    "output":"HDMI1",
                    "layout":"splith",
                    "workspace_layout":"default",
                    "last_split_layout":"splith",
                    "border":"pixel",
                    "current_border_width":-1,
                    "rect":{
                        "x":0,
                        "y":25,
                        "width":1920,
                        "height":1055
                    },
                    "deco_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "window_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "geometry":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "name":"content",
                    "window":null,
                    "window_type":null,
                    "nodes":[
                        {
                            "id":94052927892224,
                            "type":"workspace",
                            "orientation":"horizontal",
                            "scratchpad_state":"none",
                            "percent":1.0,
                            "urgent":false,
                            "focused":false,
                            "output":"HDMI1",
                            "layout":"splith",
                            "workspace_layout":"default",
                            "last_split_layout":"splith",
                            "border":"pixel",
                            "current_border_width":-1,
                            "rect":{
                                "x":0,
                                "y":25,
                                "width":1920,
                                "height":1055
                            },
                            "deco_rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "window_rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "geometry":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "name":"1",
                            "num":1,
                            "gaps":{
                                "inner":0,
                                "outer":0,
                                "top":0,
                                "right":0,
                                "bottom":0,
                                "left":0
                            },
                            "window":null,
                            "window_type":null,
                            "nodes":[
                                {
                                    "id":94052927892736,
                                    "type":"con",
                                    "orientation":"none",
                                    "scratchpad_state":"none",
                                    "percent":1.0,
                                    "urgent":false,
                                    "focused":false,
                                    "output":"HDMI1",
                                    "layout":"splith",
                                    "workspace_layout":"default",
                                    "last_split_layout":"splith",
                                    "border":"pixel",
                                    "current_border_width":2,
                                    "rect":{
                                        "x":12,
                                        "y":37,
                                        "width":1896,
                                        "height":1031
                                    },
                                    "deco_rect":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "window_rect":{
                                        "x":2,
                                        "y":2,
                                        "width":1892,
                                        "height":1027
                                    },
                                    "geometry":{
                                        "x":0,
                                        "y":39,
                                        "width":1920,
                                        "height":715
                                    },
                                    "name":"Focused window block stuck on Alacritty · Issue #786 · greshake/i3status-rust - Google Chrome",
                                    "window":31457281,
                                    "window_type":"normal",
                                    "window_properties":{
                                        "class":"Google-chrome",
                                        "instance":"google-chrome",
                                        "window_role":"browser",
                                        "title":"Focused window block stuck on Alacritty · Issue #786 · greshake/i3status-rust - Google Chrome",
                                        "transient_for":null
                                    },
                                    "nodes":[

                                    ],
                                    "floating_nodes":[

                                    ],
                                    "focus":[

                                    ],
                                    "fullscreen_mode":0,
                                    "sticky":false,
                                    "floating":"auto_off",
                                    "swallows":[

                                    ]
                                }
                            ],
                            "floating_nodes":[

                            ],
                            "focus":[
                                94052927892736
                            ],
                            "fullscreen_mode":0,
                            "sticky":false,
                            "floating":"auto_off",
                            "swallows":[

                            ]
                        },
                        {
                            "id":94052928195056,
                            "type":"workspace",
                            "orientation":"horizontal",
                            "scratchpad_state":"none",
                            "percent":null,
                            "urgent":false,
                            "focused":false,
                            "output":"HDMI1",
                            "layout":"splith",
                            "workspace_layout":"default",
                            "last_split_layout":"splith",
                            "border":"pixel",
                            "current_border_width":-1,
                            "rect":{
                                "x":0,
                                "y":25,
                                "width":1920,
                                "height":1055
                            },
                            "deco_rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "window_rect":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "geometry":{
                                "x":0,
                                "y":0,
                                "width":0,
                                "height":0
                            },
                            "name":"2",
                            "num":2,
                            "gaps":{
                                "inner":0,
                                "outer":0,
                                "top":0,
                                "right":0,
                                "bottom":0,
                                "left":0
                            },
                            "window":null,
                            "window_type":null,
                            "nodes":[
                                {
                                    "id":94052927765616,
                                    "type":"con",
                                    "orientation":"none",
                                    "scratchpad_state":"none",
                                    "percent":1.0,
                                    "urgent":false,
                                    "focused":true,
                                    "output":"HDMI1",
                                    "layout":"splith",
                                    "workspace_layout":"default",
                                    "last_split_layout":"splith",
                                    "border":"pixel",
                                    "current_border_width":2,
                                    "rect":{
                                        "x":12,
                                        "y":37,
                                        "width":1896,
                                        "height":1031
                                    },
                                    "deco_rect":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "window_rect":{
                                        "x":2,
                                        "y":2,
                                        "width":1892,
                                        "height":1027
                                    },
                                    "geometry":{
                                        "x":0,
                                        "y":0,
                                        "width":800,
                                        "height":600
                                    },
                                    "name":"Alacritty",
                                    "window":14680066,
                                    "window_type":"normal",
                                    "window_properties":{
                                        "class":"Alacritty",
                                        "instance":"Alacritty",
                                        "title":"Alacritty",
                                        "transient_for":null
                                    },
                                    "nodes":[

                                    ],
                                    "floating_nodes":[

                                    ],
                                    "focus":[

                                    ],
                                    "fullscreen_mode":0,
                                    "sticky":false,
                                    "floating":"auto_off",
                                    "swallows":[

                                    ]
                                }
                            ],
                            "floating_nodes":[
                                {
                                    "id":94052928360176,
                                    "type":"floating_con",
                                    "orientation":"horizontal",
                                    "scratchpad_state":"none",
                                    "percent":null,
                                    "urgent":false,
                                    "focused":false,
                                    "output":"HDMI1",
                                    "layout":"splith",
                                    "workspace_layout":"default",
                                    "last_split_layout":"splith",
                                    "border":"pixel",
                                    "current_border_width":-1,
                                    "rect":{
                                        "x":659,
                                        "y":396,
                                        "width":604,
                                        "height":270
                                    },
                                    "deco_rect":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "window_rect":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "geometry":{
                                        "x":0,
                                        "y":0,
                                        "width":0,
                                        "height":0
                                    },
                                    "name":null,
                                    "window":null,
                                    "window_type":null,
                                    "nodes":[
                                        {
                                            "id":94052928359696,
                                            "type":"con",
                                            "orientation":"none",
                                            "scratchpad_state":"none",
                                            "percent":1.0,
                                            "urgent":false,
                                            "focused":false,
                                            "output":"HDMI1",
                                            "layout":"splith",
                                            "workspace_layout":"default",
                                            "last_split_layout":"splith",
                                            "border":"normal",
                                            "current_border_width":2,
                                            "rect":{
                                                "x":659,
                                                "y":414,
                                                "width":604,
                                                "height":252
                                            },
                                            "deco_rect":{
                                                "x":0,
                                                "y":0,
                                                "width":604,
                                                "height":18
                                            },
                                            "window_rect":{
                                                "x":2,
                                                "y":0,
                                                "width":600,
                                                "height":250
                                            },
                                            "geometry":{
                                                "x":659,
                                                "y":414,
                                                "width":600,
                                                "height":250
                                            },
                                            "name":"Auto-Type - KeePassXC",
                                            "window":29360511,
                                            "window_type":"dialog",
                                            "window_properties":{
                                                "class":"KeePassXC",
                                                "instance":"keepassxc",
                                                "title":"Auto-Type - KeePassXC",
                                                "transient_for":29360136
                                            },
                                            "nodes":[

                                            ],
                                            "floating_nodes":[

                                            ],
                                            "focus":[

                                            ],
                                            "fullscreen_mode":0,
                                            "sticky":false,
                                            "floating":"user_on",
                                            "swallows":[

                                            ]
                                        }
                                    ],
                                    "floating_nodes":[

                                    ],
                                    "focus":[
                                        94052928359696
                                    ],
                                    "fullscreen_mode":0,
                                    "sticky":false,
                                    "floating":"auto_off",
                                    "swallows":[

                                    ]
                                }
                            ],
                            "focus":[
                                94052927765616,
                                94052928360176
                            ],
                            "fullscreen_mode":1,
                            "sticky":false,
                            "floating":"auto_off",
                            "swallows":[

                            ]
                        }
                    ],
                    "floating_nodes":[

                    ],
                    "focus":[
                        94052928195056,
                        94052927892224
                    ],
                    "fullscreen_mode":0,
                    "sticky":false,
                    "floating":"auto_off",
                    "swallows":[

                    ]
                },
                {
                    "id":94052927913936,
                    "type":"dockarea",
                    "orientation":"none",
                    "scratchpad_state":"none",
                    "percent":0.33333333333333331483,
                    "urgent":false,
                    "focused":false,
                    "output":"HDMI1",
                    "layout":"dockarea",
                    "workspace_layout":"default",
                    "last_split_layout":"splith",
                    "border":"pixel",
                    "current_border_width":-1,
                    "rect":{
                        "x":0,
                        "y":1080,
                        "width":1920,
                        "height":0
                    },
                    "deco_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "window_rect":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "geometry":{
                        "x":0,
                        "y":0,
                        "width":0,
                        "height":0
                    },
                    "name":"bottomdock",
                    "window":null,
                    "window_type":null,
                    "nodes":[

                    ],
                    "floating_nodes":[

                    ],
                    "focus":[

                    ],
                    "fullscreen_mode":0,
                    "sticky":false,
                    "floating":"auto_off",
                    "swallows":[
                        {
                            "dock":3,
                            "insert_where":2
                        }
                    ]
                }
            ],
            "floating_nodes":[

            ],
            "focus":[
                94052927891712,
                94052927888560,
                94052927913936
            ],
            "fullscreen_mode":0,
            "sticky":false,
            "floating":"auto_off",
            "swallows":[

            ]
        }
    ],
    "floating_nodes":[

    ],
    "focus":[
        94052927888048,
        94052927872288
    ],
    "fullscreen_mode":0,
    "sticky":false,
    "floating":"auto_off",
    "swallows":[

    ]
}
ammgws commented 4 years ago

OK I believe I found the issue, submitted a bugfix upstream: https://github.com/JayceFayne/swayipc-rs/pull/13

amitlevy21 commented 4 years ago

Using the latest master that has the following commits: image The issue still persist, same error and same back-trace as before

ammgws commented 4 years ago

The upstream fix was only just merged so probably need to delete Cargo.lock before building for it to grab the newest version.

amitlevy21 commented 4 years ago

Awww yes! It's fixed! :smile: Thank you!