Code Monkey home page Code Monkey logo

Comments (8)

andloh avatar andloh commented on July 23, 2024 4

@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.

from stackline.

alextremblay avatar alextremblay commented on July 23, 2024

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

from stackline.

AdamWagner avatar AdamWagner commented on July 23, 2024

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 koekeishiya/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 :-)

from stackline.

alextremblay avatar alextremblay commented on July 23, 2024

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

from stackline.

AdamWagner avatar AdamWagner commented on July 23, 2024

@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()

from stackline.

AdamWagner avatar AdamWagner commented on July 23, 2024

@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.

from stackline.

alextremblay avatar alextremblay commented on July 23, 2024

Thank you!

from stackline.

siematypie avatar siematypie commented on July 23, 2024

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 :(

from stackline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.