Skip to content

Stackline sometimes missing icons #44

Closed

Description

@alextremblay

Hello,

first off, thank you for making stackline :)

I've noticed a rather curious bug, where SOME app icons are missing. Ex:

stackline-missing-icons

In this example, there are siz windows in this stack:

  • chrome
  • alacritty
  • kitty
  • alacritty (app icon missing)
  • chrome
  • kitty (app icon missing)

What's more interesting, is that if i navigate to those windows with stack.next and stack.prev selectors, the opacity of the rest of the stackline changes, as if i had moved focus away from the entire stack (ie. the indicator background for the last-focused window in the stack becomes 50% opaque, the rest transparent)

Tried with stackline ced4473 and with latest version of master from this morning

running with yabai-v3.3.0 on MacOS Catalina

Please let me know if there's any additional information I can provide. Thank you!

Activity

  1. alextremblay commented on Sep 28, 2020

    @alextremblay
    Author

    I also sometimes see this in the hammerspoon cosole:

    2020-09-28 10:43:40: 10:43:40 ERROR:   LuaSkin: Unable to fetch element attribute NSAccessibilityFrontmostAttribute for: Alacritty
    

    This log line only shows up the very first time i create an alacritty window in a given space. I'm not sure what to make of it

  2. AdamWagner commented on Oct 4, 2020

    @AdamWagner
    Owner

    Great report, thanks @alextremblay . Every so often, I see this issue (with Chrome & Kitty specifically, in fact), but haven't been able to reproduce it reliably-enough to ensure that I've fixed it.

    I'm pretty sure it's caused by small differences in the window frame dimensions of the windows that are missing icons (stackline identifies a stack as a group of windows that share identical window frames. See asmvik/yabai#672 for a yabai FR that would enable stackline to abandon this flimsy heuristic). note that icons aren't really 'missing' – stackline simply doesn't think those windows are in the stack

    You can confirm ↑ by running yabai -m query --windows --space | fx # (jq/jid/gron or whatever) and manually comparing the frame sizes of the windows without icons.

    If this test confirms the issue (or you're just curious), you can try one of the two branches that have fuzzy frame matching:

    1. feature/fuzzy-stacked-win-detection – this is a bit old, but has just the changes you'd need to test the hypothesis
    2. feature/configuration – this is built on top of ↑ and includes a major update to configuration (see notes for details). So, it's fun and shiny, but will probably require some fiddling / changes to how your initialize stackline in your main init.lua file.

    What's more interesting, is that if i navigate to those windows with stack.next and stack.prev selectors, the opacity of the rest of the stackline changes, as if i had moved focus away from the entire stack (ie. the indicator background for the last-focused window in the stack becomes 50% opaque, the rest transparent)

    Thanks for reminding me that I should add a feature flag for the stackInactive functionality so that folks can disable it.
    That was much more difficult to get this working than I expected; I only included it out of stubbornness. What's worse, there's a hammerspoon bug (Hammerspoon/hammerspoon#2400) that makes it very difficult to detect changes in focus when switching between windows of the same app. If you've seen bugs where multiple indicators will take on 100% opacity, or fail to fade when the stack is unfocused, or fail to un-fade when the stack is focused … it's b/c of the contortions required just to detect something basic like "focus changed" in these edge-cases.


    Apologies for the length. I'll take a look at #43 now. And please don't hesitate to share more problems / ideas / suggestions :-)

  3. alextremblay commented on Oct 6, 2020

    @alextremblay
    Author

    Awesome! Thank you so much for the detailed reply. I'll definitely check out the configuration branch when I have some time to play around with it

  4. AdamWagner commented on Oct 10, 2020

    @AdamWagner
    Owner

    @alextremblay You bet, thanks for the detailed report(s). Fuzzy frame detection and improved configuration are now available on master.

    Note that the update requires Stackline to be initialized in your ~/.hammerspoon/init.lua file:

    init.lua before

    stackline = require "stackline.stackline.stackline"
    stackline:init()
  5. added
    enhancement
    on Nov 7, 2020
  6. self-assigned this
    on Nov 7, 2020
  7. added
    bug
    on Nov 7, 2020
  8. AdamWagner commented on Nov 29, 2020

    @AdamWagner
    Owner

    @alextremblay BTW, the fuzzy frame detection has been merged into master for a while now, so all you'd need to do is update stackline:

    cd ~/.hammerspoon/stackline && git pull

    If you haven't updated in a while, be sure to check out this post with upgrade instructions.

    Also, I've found that a fuzzFactor value of around 90 is best if you want to make sure that stacked iTerm2 windows are reliably detected. You can set this by overriding the default config (30) during initialization:

    -- in your ~/.hammerspoon/init.lua file
    stackline = require "stackline.stackline.stackline"
    local stacklineConfig = {
        features = {
            fzyFrameDetect = {
                enabled = true,
                fuzzFactor = 90 -- high fuzz factor ensures that apps that constrain window sizes (like iTerm2) are reliably detected
            },
        },
    }
    stackline:init(stacklineConfig)

    I'm going to close this, but feel free to reopen or create a new issue if you find the issue persists.

  9. alextremblay commented on Dec 8, 2020

    @alextremblay
    Author

    Thank you!

  10. andloh commented on Jun 22, 2022

    @andloh

    @alextremblay Hi!

    I have the same issue as you. Did you mange so solve it? I have the latest version of stackline and increased the fuzzy to 90.

    It’s mainly an issue with alacrity, but I see it happening to google chrome aswell.

  11. siematypie commented on Mar 2, 2023

    @siematypie

    I have the same issue with alacritty only, first instance shows up but every additional shows up as a blank icon, fuzzy is not helping :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions