Giter Club home page Giter Club logo

miro-windows-manager's Introduction

Hi there! Iโ€™m Miro, a Full-Stack Software Engineer working at New York University in Abu Dhabi. Originally from Italy, I earned my MS and BS from the University of Bologna. I like computer science, I like art, and wherever they meet together.

A more complete list of my projects: https://miromannino.com/portfolio/


miro-windows-manager's People

Contributors

miromannino avatar primeminister avatar sumnermic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miro-windows-manager's Issues

Can't figure out how to bind to modal

I'm not good at lua, and can't figure out how to bind to a modal keybind I call dot.
Neither of these work:

dot = hs.hotkey.modal.new({"cmd", "shift"}, '.')
spoon.MiroWindowsManager:bindHotkeys({
  up = dot:bind('', 'up')
  down = {dot, "up"} 
})

Is there some other way, or do I have to fork and change the actual spoon to make it work?

Thank you, this is exactly what I wanted!

Thank you so much for making this spoon!

I've been using Hammerspoon for years with my own simple window management bindings. For most of that time I've been meaning to spend the effort to improve them to enable e.g. cycling through sizes and easier corner management. In a fit of procrastination I decided that today's the day to build that setup. But after a quick search and finding this package, it took me all of 5 minutes to rip out my config and replace it with this, and procrastination avoided!

Well done, very much appreciated!

love this

the only issue I have with miro-windows-manager is the fact that I didn't discover it sooner. just getting into HammerSpoon and love this ๐Ÿฅ„ ... so handy, nice work @miromannino !

maximise vertically after centering

Hey there

(enter lots of thanks for this Spoon here)

When I have centred a window using hyper+f (twice or thrice) I'd like to maximise it vertically.

using hyper+up+down, however, turns it back to full screen, which I did not expect.

As pressing hyper+f will get back to full screen anyway, I think it would make a lot of sense to allow for selective vertical/horizontal maximisation also from a centred state.

Sometimes maximize vertical does not trigger

I'm using Miro with the following config tweak:
spoon.MiroWindowsManager.sizes = { 6/5, 4/3, 3/2, 2/1, 3/1, 4/1, 6/1 }

When I want the current window to be 'tall', I'd press hyper+up followed by hyper+down.
This seems to be sensitive to how quickly I press the keys, but the required interval between them seems too short.

Code inspection does not reveal any timing requirement between keystrokes,
so I'm confused why it has this behavior.

Accommodate for stagemanager in Mac OS 13 (Ventura)

Mac OS 13 features Stage Manager. A portion of the left side of the screen is reserved for quick access to apps. It would be nice when cycling through hyper-left/right the window expands up to the border of stage manager of starts at the border of stage manager.

This is probably quite easy to accomplish, but I haven't look into it yet.

PS. Thanks for Miro Windows Manager. For years now I am a happy user.

13" mbp monitor issue

Hi! Amazing spoon. I spent hours manually making a config before I found this which did almost everything I needed.

My Setup: is a MBP with external monitor.

I am having issues with using this spoon on my laptop monitor. It works flawlessly on my external display but for whatever reason repeated presses of the hotkey do not cycle through the sizes. Only the first size is available.

Here is my init.lua: https://github.com/a7hybnj2/dotfiles/blob/master/.hammerspoon/init.lua

Add ability to center window

Thanks for making the spoon, it's so great.

Sometimes I have one window open on a large screen and it's nice to be able to center that window. I'd find it really convenient if there was an additional hotkey for this, e.g., center = {hyper, "c"}. I'm imagining this would take the current window and move it to the center of the screen, preserving the dimensions and y position.

Caps mapped to control does not handle "up"+"down"

I've got my ctrl mapped on my caps. My hyper is ctrl+cmd.

If I use the actual ctrl key+cmd+up+down, the window will stretch vertically, as it should. If I do the same thing with caps, it doesn't work.

All other shortcuts work, including ctrl+cmd+left+right for horizontal stretching.

Any ideas why? No errors on the console.

Allow Mac Full Screen

Hi,

currently Hyper-f only maximizes the window. Is there a way to use MacOSX Fullscreen-Mode?

Daniel

Auto-align after resolution / monitor change

This is just an idea: I have different monitors and sometimes use the laptop screen as well. Is there a way with Miro or just Hammerspoon to detect this and reposition window if the monitor (effectively the resolution) changes?

That would absolutely fantastic feature to have :)

Having issues with getting back to full height after moving to corners

Sorry, pressed the enter button fast.

Thanks for the wonderful program.

I am having issues getting back to full height after moving to the corners. It says to press both the up + down or the left and right. However, my windows are cycling through fractions instead of getting back to full heights. I do not know what I am missing. Maybe it is not considering the buttons to be pressed simultaneously . Any ideas what could it be. I am on MacOs Ventura.

Fullscreen blocks miro

Miro does not work when a window is fullscreen (press control command F or click green button in top left to enter fullscreen).
image
My solution is to exit fullscreen before every action that Miro takes:

function obj:_exitFullScreen(win)
  local win = win or hs.window.focusedWindow()
  if win:isFullScreen() then
    win:setFullScreen(false)
  end
end

I submitted a pull request (#27) that seems to work well. I am using this version of the code in my personal setup and very happy with how it works.

Multi Screen Support

Firstly great plugin for hammerspoon - I've only just made use of this tool recently and currently its the only plugin I'm using.

Was wondering if you were interested in implementing a multiscreen setup within your plugin, allowing windows to be moved to different screens. I'm happy to give this a go, I've never programmed in lua (I'm a python programmer) - but looking at the source its easy to read and shouldn't be to difficult to implement. What I was thinking is creating a new short-cut for each detected display. So for example in a 3 screen environment you would have

hyper + 1 - Move to screen 1 into the centre.
hyper + 2 - Move to screen 2 into the centre.
hyper + 3 - Move to screen 3 into the centre.

Rather than edit your positions.lua file I'll create something new like screens.lua

I've found some resources and examples which I'm hoping to integrate into your config. EDIT these are actually for switching between spaces not screens - but i would also like to implement this.

  1. https://github.com/Hammerspoon/hammerspoon/issues/235
  2. https://github.com/szymonkaliski/Dotfiles/tree/master/Dotfiles/hammerspoon

for reference im going over the hs.screen API

Just wanted your thoughts; and if you think its a good idea incorporating this into your config or creating a new plugin that works with yours ?

"fullscreen" sizes are too wide on a widescreen display.

I have a widescreen monitor, and so far everything works great, however when I toggle the fullscreen sizes, my windows are often too wide, because the mimic the monitor size.
Ideally I would like to make the fullscreen keybind, cycle between true fullscreen and more square (less) wide size scales.

I have tried tweaking the code, namely:

    cell.w = self.GRID.w / nextSize
    cell.h = self.GRID.h / nextSize
    cell.x = (self.GRID.w - self.GRID.w / nextSize) / 2
    cell.y = (self.GRID.h - self.GRID.h / nextSize) / 2

However, everything I try either breaks the function, or does not seem to have the intended effect.
I'm sure there is a way to make the script use a smaller window width, when stepping through sizes but I have been unable to figure it out.
I would appreciate any tips on how to achieve the desired effect.

Multiple bindings?

Forgive me if this is obvious, but I am new to hammerspoon and miro-windows-manager

I'd like to have multiple bindings:

  • fullscreen = {hyper, "f"}
  • fullscreen = {hyper, "padenter"}

Is this possible?

And I'd like to bind single keys to:

  • top left
  • top right
  • bottom left
  • bottom right

In addition to the existing keys to move windows gradually.

Thanks

More resizing break points

I love this plugin, so thank you for that! I often find that I would like to have more break points when I'm resizing a window. I think there are 3 sizes currently. I was wondering if there is a setting I could use to add more sizes or if you could point me to where I could make the update in my own setup?

Certain apps do not cycle through all vertical windows sizes

When sizing apps on my desktops, I usually use hyper + arrow keys to position and size windows. For most apps, when I cycle hyper+up/down, I see the following frame sizes: 2/3, 1/2 and 1/3.

However, two apps (Chrome and Slack) I've found so far don't cycle the same as others (Sublime Text, iTerm, etc).

I'm wondering if there is something preventing these apps from working consistently and if some change can be made so that all app frames work the same.

60/40 split

I would like to split the screen 60/40 as it would allow VS Code with two panes (60%) and a browser (40%) side-by-side on my 27" 2K monitor, but I can't get it to work.

With halfs, VS Code does not have enough space for two panes, and with thirds, the browser window is too narrow.

These configs work if I try them one after another:

spoon.MiroWindowsManager.sizes = { 2, 5/2 }
and
spoon.MiroWindowsManager.sizes = { 2, 5/3 }

But these don't work (the latter of the fives is not effective):
spoon.MiroWindowsManager.sizes = { 2, 5/2, 5/3 }
and
spoon.MiroWindowsManager.sizes = { 2, 5/3, 5/2 }

As the config mentioned at #11 (comment) works for me, I've tried fiddling with the GRID setting..:
spoon.MiroWindowsManager.GRID = {w = 30, h = 24}
... in case the grid would have to be divisible by the pane sizes (the default 24 is not divisible by 5), but this did not help.

Am I doing something wrong?

Thanks!

EDIT: I have macOS Catalina 10.15.7 Big Sur 11.6

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.