peterklijn / hammerspoon-shiftit Goto Github PK
View Code? Open in Web Editor NEWA ShiftIt like Hammerspoon window management configuration
License: MIT License
A ShiftIt like Hammerspoon window management configuration
License: MIT License
When using an ultra-wide screen then quarters of the screen are a bit too wide for my liking. Is there a way to implement a grid of six or more equal-size rectangles to which one can snap a window?
Please Wait!
Hear me out.
Before you respond with, "this already has a solution, read the docs" and close the issue, I did do that and am still having an issue with the setup:
I'm moving on to try the Spooninstall method. Is there a debug log I can send?
Is it already posted above?
Thanks for hearing me out!
hello!
is there a way to enable the multipleActionsCycleWindowSizes flag? previously it was able to be set via command line:
defaults write org.shiftitapp.ShiftIt multipleActionsCycleWindowSizes YES
, but that doesn't appear to work with hammerspoon.
original shiftit issue: fikovnik/ShiftIt#303
original shiftit docs: https://github.com/fikovnik/ShiftIt#how-do-i-turn-onoff-windows-cycling-sizes-with-multiple-hotkey-presses
thanks so much!
Hey there. I love using this software and would like to use it on my work laptop but can't till IT sees that it is legally OK to do so. Can you please add a license to the repo?
Firstly, thanks so much for providing this - so wonderful to have this functionality.
I used very successfully on an intel mac, and just switched over to an M1, where the window re-sizing works via hotkey, but not various other commands/hotkeys particularly nextScreen/n
which I really miss.
Does anyone know of a change needed to adapt to M1 - I've got it on Monterey 12.3.1
Could it be the OSX version? I can't quite remember if this was working before the latest update ...
Many thanks in advance for any help
Hello, I'm trying to run brew install --cask hammerspoon
and I'm hitting this issue...
╰─⠠⠵ brew install --cask hammerspoon
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 679362, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 679362 (delta 2), reused 8 (delta 2), pack-reused 679354
Receiving objects: 100% (679362/679362), 321.84 MiB | 9.75 MiB/s, done.
Resolving deltas: 100% (482189/482189), done.
Error: Invalid cask: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/portfolioperformance.rb
Cask 'portfolioperformance' definition is invalid: invalid 'sha256' value: {:arm=>"188e28f33e501c73706e656b88e7412d2a8998504b260eb893915d46d26d80a7", :intel=>"c678b5086
0be1bec1feb16d3aed6362141da184060f642266a35d83ff2e5fa96"}
Error: Invalid cask: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/tropy.rb
Cask 'tropy' definition is invalid: invalid 'sha256' value: {:arm=>"d730a8747596a1a6d0c869cadbdc3bdff5ed371e05b205fad6b397dc5a4b872f", :intel=>"ef8e62028cd991ed8e668797
035286f4e5220190a9d70591fe7e853be90b862d"}
Error: Invalid cask: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/mqttx.rb
Cask 'mqttx' definition is invalid: invalid
...
Error: Invalid cask: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/visual-paradigm.rb
Cask 'visual-paradigm' definition is invalid: invalid 'sha256' value: {:arm=>"7a902e121e32f8a1066607a41302344270c33f02d2e4c9ca42e7a7bbb691345f", :intel=>"7f3be96a45e178
54d9fd825bdb4d9d8737e25d1253aabe9dafd4a2b128bdcb9a"}
Error: Cannot tap homebrew/cask: invalid syntax in tap!
OS: MacOS Monterey (12.6)
CPU: Intel Core i7
Any suggestions?
Running into this issue with a fresh install (attempted both ShiftIt.spoon and SpoonInstall.spoon)
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.6
BuildVersion: 18G6020
2020-08-10 17:52:07: Welcome to the Hammerspoon Console!
You can run any Lua code in here.
2020-08-10 17:52:07: -- Lazy extension loading enabled
2020-08-10 17:52:07: -- Loading ~/.hammerspoon/init.lua
2020-08-10 17:52:07: -- Loading Spoon: SpoonInstall
2020-08-10 17:52:07: -- Loading extension: logger
2020-08-10 17:52:07: -- Loading extension: spoons
2020-08-10 17:52:07: -- Loading Spoon: ShiftIt
2020-08-10 17:52:07: -- Loading extension: hotkey
2020-08-10 17:52:07: 17:52:07 hotkey: Enabled hotkey ⌘⌃⌥LEFT
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥RIGHT
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥UP
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥DOWN
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥1
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥2
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥3
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥4
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥M
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥F
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥Z
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥C
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥N
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥P
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥=
2020-08-10 17:52:07: hotkey: Enabled hotkey ⌘⌃⌥-
2020-08-10 17:52:07: -- Done.
2020-08-10 17:52:18: -- Loading extension: window
2020-08-10 17:52:18: -- Loading extension: uielement
2020-08-10 17:52:18: ********
2020-08-10 17:52:18: 17:52:18 ERROR: LuaSkin: hs.hotkey callback: .../.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
.../.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
.../.hammerspoon/Spoons/ShiftIt.spoon/init.lua:114: in function 'ShiftIt.right'
.../.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162: in function <.../.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162>
2020-08-10 17:52:18: ********
Hi,
The install steps and fundamental configuration are really confusing.
Please fix the Homebrew formula so that the example configurations no longer produce nil index errors out of the box. For example, go ahead and ship the default spoon(s) as a post-install step in the Homebrew formula.
For now, I'm sticking with the classic ShiftIt application rather than Hammerspoon.
While the classic ShiftIt sucks at cohabitating with Zoom and other videoconferencing apps, at least the basic GUI and documentation are more intuitive.
The use of the hotkeys results in an error. The window is not moved. Unless, oddly, the window is the Hammerspoon console window. It only seems to work on that window.
2021-07-27 13:15:27: Welcome to the Hammerspoon Console!
You can run any Lua code in here.
2021-07-27 13:15:27: -- Lazy extension loading enabled
2021-07-27 13:15:27: -- Loading ~/.hammerspoon/init.lua
2021-07-27 13:15:27: -- Loading Spoon: ShiftIt
2021-07-27 13:15:27: -- Loading extension: hotkey
2021-07-27 13:15:27: 13:15:27 hotkey: Enabled hotkey ⌘⌃⌥LEFT
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥RIGHT
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥UP
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥DOWN
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥1
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥2
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥3
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥4
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥M
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥F
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥Z
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥C
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥N
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥P
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥=
2021-07-27 13:15:27: hotkey: Enabled hotkey ⌘⌃⌥-
2021-07-27 13:15:27: -- Done.
2021-07-27 13:16:02: -- Loading extension: window
2021-07-27 13:16:02: 13:16:02 ERROR: LuaSkin: hs.hotkey callback: /Users/user/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/user/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/user/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:114: in function 'ShiftIt.right'
/Users/user/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162: in function </Users/user/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162>
I only want to change the window height or width.
Thanks.
Using an external keyboard with my macbook, side numbers don't work and can't be bound. Is there a workaround? Thanks
Is the numpad supposed to work with any of the hotkeys? It doesn't seem to.
I would have main window for (for example) 80% from the left and a second window for 20% from the right instead 50-50
How can I achieve that?
2020-09-01 14:31:39: ********
2020-09-01 14:31:39: ********
2020-09-01 14:31:39: 14:31:39 ERROR: LuaSkin: hs.hotkey callback: /Users/lewin/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/lewin/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/lewin/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:115: in function 'ShiftIt.up'
/Users/lewin/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:163: in function </Users/lewin/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:163>
2020-09-01 14:31:39: ********
In ShiftIt, ctrl + option + command + <left>
twice would put a window at 1/3rd of the screen. Can hammerspoon-shiftit support it too?
The error console just shows the entire GitHub HTML but maybe this is the relevant bit?
<meta name="selected-link" value="/peterklijn/hammerspoon-shiftit.git/raw/master/docs/docs.json" data-pjax-transient>
I don't use the upleft
upright
keys, is there a way to disable them?
Tried
spoon.ShiftIt:bindHotkeys({
upleft = nil,
upright = nil,
botleft = nil,
botright = nil,
})
to no avail
It would be great if we could specify a specific resolution (e.g. 1920x1080) with a hotkey.
I was curious if it's possible to bind an action to two keys instead of one. This was something I've been doing with Miro Windows Manager.
For example:
If I have a window on the right hand side and hit the DOWN
+LEFT
arrow keys simultaneously, the window is moved to the lower left-hand corner of the window.
if I have a window in the lower-left corner but I resized it manually, then hit the UP
+DOWN
arrow keys simultaneously, the window will be on the left side but is now tall. If I hit those same arrow keys again it returns to it's original size.
Is this possible with Hammerspoon Shifit?
Here are some example keybindings:
local hyper = {'ctrl', 'alt', 'cmd'}
hs.window.animationDuration = 0.1
spoon.MiroWindowsManager:bindHotkeys({
fullscreen = {hyper, 'm'},
up = {hyper, 'up'},
right = {hyper, 'right'},
down = {hyper, 'down'},
left = {hyper, 'left'},
upleft = {hyper, 'up', 'left'},
upright = {hyper, 'up', 'right' },
botleft = {hyper, 'down', 'left' },
botright = {hyper, 'down', 'right' },
})
With the latest Google Chrome release Version 110.0.5481.177 (Official Build) (arm64)
I'm no longer able to position the chrome window. It's still working for other browser and windows.
Did something change recently?
Just tried to install shiftit as described in the alternative installations section
When reloading the config, I get the following error. Any ideas what I might be missing?
2021-02-27 10:26:09: *** ERROR: /Users/user/.hammerspoon/init.lua:3: attempt to index a nil value (global 'spoon')
stack traceback:
/Users/user/.hammerspoon/init.lua:3: in main chunk
[C]: in function 'xpcall'
...app/Contents/Resources/extensions/hs/_coresetup/init.lua:702: in function 'hs._coresetup.setup'
(...tail calls...)
I just installed this on my Big Sur machine and unfortunately after following the instruction here, none of the shortcuts work.
Below is my log
2021-01-30 15:42:19: Welcome to the Hammerspoon Console!
You can run any Lua code in here.
2021-01-30 15:42:19: -- Lazy extension loading enabled
2021-01-30 15:42:19: -- Loading ~/.hammerspoon/init.lua
2021-01-30 15:42:19: -- Loading Spoon: ShiftIt
2021-01-30 15:42:19: -- Loading extension: hotkey
2021-01-30 15:42:19: 15:42:19 hotkey: Enabled hotkey ⌘⌃⌥LEFT
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥RIGHT
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥UP
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥DOWN
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥1
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥2
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥3
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥4
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥M
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥F
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥Z
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥C
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥N
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥P
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥=
2021-01-30 15:42:19: hotkey: Enabled hotkey ⌘⌃⌥-
2021-01-30 15:42:19: -- Done.
2021-01-30 15:43:03: -- Loading extension: window
2021-01-30 15:43:03: 15:43:03 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:113: in function 'ShiftIt.left'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161>
2021-01-30 15:43:03: 15:43:03 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:113: in function 'ShiftIt.left'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161>
2021-01-30 15:43:03: 15:43:03 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:115: in function 'ShiftIt.up'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:163: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:163>
2021-01-30 15:43:04: 15:43:04 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:116: in function 'ShiftIt.down'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:164: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:164>
2021-01-30 15:43:04: 15:43:04 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:116: in function 'ShiftIt.down'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:164: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:164>
2021-01-30 15:43:05: 15:43:05 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:116: in function 'ShiftIt.down'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:164: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:164>
2021-01-30 15:43:05: 15:43:05 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:114: in function 'ShiftIt.right'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162>
2021-01-30 15:43:05: 15:43:05 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:113: in function 'ShiftIt.left'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161>
2021-01-30 15:43:06: 15:43:06 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:114: in function 'ShiftIt.right'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:162>
2021-01-30 15:43:06: 15:43:06 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:113: in function 'ShiftIt.left'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161>
2021-01-30 15:43:06: 15:43:06 ERROR: LuaSkin: hs.hotkey callback: /Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: attempt to index a nil value
stack traceback:
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:51: in function 'move'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:113: in function 'ShiftIt.left'
/Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161: in function </Users/me/.hammerspoon/Spoons/ShiftIt.spoon/init.lua:161>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.