Code Monkey home page Code Monkey logo

hammerspoon's People

Contributors

s1ngs1ng 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

hammerspoon's Issues

Could you split your functionality files from your key bindings files

I LOVE the functionality but need to use different keybindings. An easy way for me to do this would be to require your "business logic files", but not your binding files. So for example:

window-management.lua splits into two files, something like:

window-management-logic.lua
window-management-bindings.lua

Then windows-management-logic would return the window functionality like:

   return {
    -- ...
    leftHalf = leftHalf,
    rightHalf = rightHalf,
   -- ...
}

ps - awesome functionality!

QQ on mac with configFile there is leg

I install mac qq before some days.
I like ur software but with one problem
I use shortcut to move mac qq from one display to another, there is a very long lag
may be one issue?

Question?

-- Please leave a comment if you have any suggestions

current = {}
function init()
  current.win = hs.window.focusedWindow()
  current.scr = hs.window.focusedWindow():screen()
end

function current:new()
  init()
  o = {}
  setmetatable(o, self)
  o.window, o.screen = self.win, self.scr
  o.screenGrid = grid.getGrid(self.scr)
  o.windowGrid = grid.get(self.win)
  return o
end

vs

local grid = require 'hs.grid'
local win = require 'hs.window'
local windowMeta = {} 

setmetatable(windowMeta, {
  __call = function (cls, ...)
    return cls.new(...)
  end,
})

function windowMeta.new()
  local self = setmetatable({}, windowMeta)
  
  self.window = win.focusedWindow()
  self.screen = self.window:screen()
  self.windowGrid = grid.get(self.window)
  self.screenGrid = grid.getGrid(self.screen)
  
  return self
end  

return windowMeta

What's wrong with this? I don't have a ton of Lua under my belt, so I might be missing something. I don't see why you are creating an extra object o in your current code?

Hit and Miss Move Function

Hi @S1ngS1ng

First of all, thank you very much for making this highly useful window management spoon. Wanted to report some issues that have been popping up lately. For context, I have two external monitors connected to a Macbook Pro. Both the external monitors are identical in make. I have set one of the External monitors as the main display followed by the second external as the extended display on the right, followed by the built-in retina display further to the right.

My issue is on the Main display, the wm.throwLeft and wm.throwRight don't work for all apps. Interestingly I am able to throw apps fine between the second and the third displays.

Moreover, on the main display, the move window to screen feature works fine for apps like VS Code.

Hope the screencasts below are helpful:

VS Code:
https://user-images.githubusercontent.com/11236148/184877441-5a3ff701-c171-4b35-9922-cd2fba000978.mp4

Chrome:
https://user-images.githubusercontent.com/11236148/184878225-5d47f57e-9a62-4f33-9042-2d847322b4b0.mp4

Would appreciate any ideas on what could be wrong.

Cheers.

Error in window-management.leftHalf

window-management.lua:105: in function 'window-management.leftHalf'
LuaSkin: hs.hotkey callback: window-management.lua:105: field 'setShadows' is not callable (a nil value)

Window Always on Top

There used to be an app called Afloat (and then AfloatX) that did this, but they don't work anymore. Is it possible to use Hammerspoon in this WM system to keep a window/app on top? It'd really help.

数字键

感谢您的配置文件, 想请教您一下, 这个字母键不能替换为数字键是吧

suggestion for window managment

Hi,

I was wondering would you be able to make following work as well.

snap back to original size/position ?
move the window to next desktop ?

I was wondering would it be able to get the window send to quarter of the screen, meaning if I have iTerm2 and 4 of them open i can equally send them to each corner. ( hope that make sense.)

Also I noticed that sometimes 2 different apps don't align properly see the image.
screen shot 2018-03-28 at 11 29 28 pm

but also if you have multiple apps as well.

screen shot 2018-03-28 at 11 32 08 pm

thanks heaps.
lx

Could you add window. PushHalfLeft PushHalfRight

I'll use left as an example, but the same applies to right

The idea is you keep pushing the half maximized window to the left wrapping around the screens as needed.

Imagine you have 2 monitors M1, M2. They have a L side and a R side. Graphically:

M1_L | M1_R | M2_L | M2_R

If your window is in M1_R, and you press the hotkey 6 times you'd go through this sequences
M1_R
M2_L
M2_R
M1_L
M1_R
etc

ps. This is how windows does it.

thanks!

I integrated your throw screen left & right super easily from your code.
Many thanks!

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.