Giter VIP home page Giter VIP logo

Comments (10)

idvorkin avatar idvorkin commented on June 18, 2024 1

Yup on all counts! I grew up on Windows (and actually worked at Microsoft for 15 years) and I'm very fond of that usage :)

from hammerspoon.

S1ngS1ng avatar S1ngS1ng commented on June 18, 2024

I see what you mean.

BTW what is the shortcut on Windows for this feature? I think it is win + left and win + right? I haven't tried multi-screen layout on windows. But I did notice that for a single monitor, the window takes left/right half of the screen when I do win + left/right.

I think what we need here, is just letting the window cycle through all monitors while taking left/right half. Right?

from hammerspoon.

S1ngS1ng avatar S1ngS1ng commented on June 18, 2024

@idvorkin Check it out, I just added this feature.
Logic
KeyBinding

Lemme know if you have any comments, concerns or questions.
🍻

from hammerspoon.

idvorkin avatar idvorkin commented on June 18, 2024

This is a great start, but it doesn't work quite right :) Let me give an example of what's happening.

M1_L | M1_R | M2_L | M2_R

Going right from M1_L does:

CORRECT: M1_L-> M1_R -> M2_L -> M2_R
STOPS WORKING: -> M2_L -> M2_R -> M2_L -> M2_R

from hammerspoon.

S1ngS1ng avatar S1ngS1ng commented on June 18, 2024

@idvorkin :(
Would you mind adding print(hs.inspect(screenArr)) to line 23, right after the end in "window-management.lua",

and also, execute this: hs.inspect(hs.screen.allScreens()) in console.

I might need both outputs for debugging. There might be some cases I am missing.

Sorry for that. If you could provide some debug info, that would be perfect. Thanks!

from hammerspoon.

idvorkin avatar idvorkin commented on June 18, 2024

Sorry for the delay - Monday when I get to my 3 monitor setup I'll give this a go. When I'm using my laptop without external monitors cycling does work correctly.

BTW - are you getting enough output from hs.inspect, right now I'm seeing ..
2017-02-04 07:12:23: {
[0] = <userdata 1> -- hs.screen: Color LCD (0x7fcff2a15f88)
}

from hammerspoon.

idvorkin avatar idvorkin commented on June 18, 2024

OK, I can get a repro on my single external monitor setup as well. Here's what I'm printing

print ("screenArr")
print(hs.inspect(screenArr))
print ("allScreens")
print(hs.inspect(hs.screen.allScreens()))

Output

2017-02-04 08:46:32: screenArr
2017-02-04 08:46:32: -- Loading extension: inspect
2017-02-04 08:46:32: {
  [0] = <userdata 1> -- hs.screen: DELL U3415W (0x7fcff2a5ba08)
}
2017-02-04 08:46:32: allScreens
2017-02-04 08:46:32: { <userdata 1> -- hs.screen: Color LCD (0x7fcff05b6778), <userdata 2> -- hs.screen: DELL U3415W (0x7fcff05b6918) }

from hammerspoon.

S1ngS1ng avatar S1ngS1ng commented on June 18, 2024

@idvorkin Thanks for your info.

The following output looks weird, did you try to plug or unplug several times? Though I think this case is already handled there. I'll try to debug on this with my friend's laptop later.

{
  [0] = <userdata 1> -- hs.screen: DELL U3415W (0x7fcff2a5ba08)
}

I just made a tiny update, noticed that I was doing wrong on the logic. Check it out please: cc5eaf4

The only affected file is the window-management.lua.

Please lemme know if it is still not working as expected. Thanks

from hammerspoon.

idvorkin avatar idvorkin commented on June 18, 2024

That fixes the problem.

from hammerspoon.

S1ngS1ng avatar S1ngS1ng commented on June 18, 2024

@idvorkin Awesome. Lemme know if it is not stable in the future. Mind if I close this issue for now?

from hammerspoon.

Related Issues (15)

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.