GithubHelp home page GithubHelp logo

Comments (8)

oberon-manjaro avatar oberon-manjaro commented on August 20, 2024

Other than that it's an awesome idea. :) I love your script and I have just packaged it for Manjaro Linux and for the AUR.
It would be great if you could fix that problem...

from i3-alternating-layout.

Airblader avatar Airblader commented on August 20, 2024

This patch seems to fix it. @Oberon2007 Maybe you can verify

diff --git a/alternating_layouts.py b/alternating_layouts.py
index a335c85..32c52b5 100755
--- a/alternating_layouts.py
+++ b/alternating_layouts.py
@@ -56,6 +56,7 @@ def main():
     """
     process = subprocess.Popen(
         ['xprop', '-root', '-spy'],
+        shell = True,
         stdout=subprocess.PIPE,
         stderr=subprocess.PIPE
     )

It does happen because it busy loops as I suspected in the Manjaro-i3 forums. I'm not sure why this particular patch works because I haven't looked into the docs yet on why it makes readline behave differently, but I simply compared it to the proposed way of blocking reads found in articles.

from i3-alternating-layout.

olemartinorg avatar olemartinorg commented on August 20, 2024

Thanks @Airblader! I just read the emails i got for this issue, and I haven't had time to research it yet. Hoping that your fix does the trick!

Would you mind linking to the thread in the Manjaro-i3 forums, in case anyone else stumbles upon this and wants to get the full picture?

from i3-alternating-layout.

Airblader avatar Airblader commented on August 20, 2024

Sure. The problem was described here: https://forum.manjaro.org/index.php?topic=29773.msg248539#msg248539

Let's wait for @Oberon2007 to confirm the fix, though. :)

from i3-alternating-layout.

oberon-manjaro avatar oberon-manjaro commented on August 20, 2024

Thanks a lot @Airblader . Unfortunately that doesn't fix it. Actually it does weird things:
launching the script does nothing but change the mouse-cursor to a selection cross 😆 Then invoking the script a 2nd time it works BUT cpu here goes to 25% and stays there even when I open containers.

from i3-alternating-layout.

Airblader avatar Airblader commented on August 20, 2024

This is so odd. I swear it worked for me earlier, but running it again I have exactly the same issues as you. Well, let's reopen then. Maybe @olemartinorg wants to look at it now then. Sorry about that. :)

from i3-alternating-layout.

olemartinorg avatar olemartinorg commented on August 20, 2024

Allright, sorry about that. I debugged it now, and it seems that my script goes into an infinite loop when no window is open, as xprop events are produced every time my script changes the layout.

I applied a fix where it won't do anything if the same event is produced twice, and that seems to fix it. I'll until @Oberon2007 can confirm the fix before closing the issue this time - i got a bit trigger happy last time.. ;-)

from i3-alternating-layout.

oberon-manjaro avatar oberon-manjaro commented on August 20, 2024

Brilliant! That fixes it. Thank you very much! :)

from i3-alternating-layout.

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.