8 ms·
Show HN: Phoenix 2.6 – a macOS window and app manager scriptable with JavaScript
- atopuzov 8y agoHow does it compare to hammerspoon?
- saagarjha 8y agoIt looks like this just does window management, rather than the many things that Hammerspoon supports.
- khirviko 8y agoYes! Though I’ve seen people extending the support in Phoenix cleverly by using the Task API. Basically you can run any external processes or scripts.
- khirviko 8y agoHammerspoon uses Lua for the configuration language. Phoenix uses JavaScript, or anything that translates to it. Personally I think Phoenix’s API is much simpler and easier to understand, but I’m of course bias. :) Hammerspoon does have some additional features that go beyond window and app management. Phoenix doesn’t cover those.
- mi100hael 8y agoIs this related at all to Slate (https://github.com/jigish/slate https://github.com/jigish/slate), which also has a JS API?
- khirviko 8y agoIn many conceptual ways, such as sharing the same language for configuration, though this is a completely different project so they don’t share the same origin. Slate has become rather abandoned and unsupported nowadays. Phoenix hopefully continues strong in this area.
- marstall 8y agostill works nicely though, i will add (slate)
- xemoka 8y agoI use MacOS at home and happily use Hammerspoon to manage these interactions, in the past using Slate—I use Windows at work and I really wish it had something better than AutoHotKey: is this just something I'm unaware of or does the design of windows really hamper the creation of tools like these?
- acmecorps 8y agoI have a 34" 1440p screen and I use Mozaic.app (https://www.lightpillar.com/mosaic.html https://www.lightpillar.com/mosaic.html) for managing my windows. Usually, i'll divide my windows as either 1:1, 1:2:1 or 1:4 sizes. It's pretty useful as I can use keyboard shortcuts to position my windows. Is there any added benefits that I can get by using phoenix or hammerspoon?
- xemoka 8y agoAs a hammerspoon user, probably not if that's all you're using it for. Hammerspoon does add a bunch of extra features mosaic doesn't add—but if you don't need them and you've already invested in software to solve your problem: not likely.
- acmecorps 8y agoIf you don't mind, what are the use cases that makes hammerspoon very useful for you?
- xemoka 8y agoBasically the same reason you're using mosaic + the ability to change what exactly is being done. I use it to map 'hyper'+key (where hyper is the equivalent of ctrl+cmd+shift+option and is assigned to control, capslock is assigned to the original control functionality) to move windows between screens and on their own grid. Effectively I just didn't pay for mosaic-like functionality. I have better touch tool, but I never liked having to drag to snap and had hammerspoon implemented already.
- e_proxus 8y agoMy use case is to split the screen in two, editor on one side and terminal on the other. I specifically want the terminal to be 80 characters wide (inside that window I use tmux), and the editor to take up the rest of the space. I've tried most of the simpler, GUI-based window managers for macOS but I haven't found one that let's me set window sizes explicitly in pixels yet. With hammerspoon I figure out the width of the terminal app I want, and adjust the windows accordingly.
- partycoder 8y agoI used Spectacle: https://www.spectacleapp.com/ https://www.spectacleapp.com/ It is not scriptable but gets the job done.
- kemar 8y agoI used Phoenix to reimplement some features of MercuryMover https://github.com/kemar/phoenix-mercury-mover https://github.com/kemar/phoenix-mercury-mover You can almost do what you want with Phoenix. I'm a huge fan
- asselinpaul 8y agoI've been enjoying chunkwm as a tiling WM. Hard to go back to non-tiling when you've experienced it. https://github.com/koekeishiya/chunkwm https://github.com/koekeishiya/chunkwm
- RBerenguel 8y agoI’ve tried tiling WM (well, MacOS’ Amethyst, before that used kwm for a while, used fluxbox a long time ago on arch which can be used with tiling) but still can’t get the “why”, they don’t help my process and mostly stand on my way. Anything I’m missing? What do you find so changing?
- asselinpaul 8y agoA few reasons: - I know what is going to happen when I open anything and can get things where they need to be very quickly (since it is keyboard driven). - The wm is working with me to use the entire screen. - You can always revert to making windows float if you need it. - You can use supporting terminal with no title bar which saves space (see here https://www.dropbox.com/s/0f08qa0dbhhc6nv/Screen%20Shot%202018-04-08%20at%2018.41.15.png?dl=0 https://www.dropbox.com/s/0f08qa0dbhhc6nv/Screen%20Shot%2020...) It is occasionally annoying when something doesn't behave as expected but its a fun tool to use in general.
- innocentoldguy 8y agoCan you configure the margins between those three terminal windows? I currently use Tmux with one fullscreen terminal to achieve a similar effect, but this looks interesting too. I'd like to eliminate any margins though. A one-pixel border is all I would want.
- asselinpaul 8y agoAbsolutely. You can configure everything (global padding, inter-tile padding etc...)
- 8y ago
- fabiospampinato 8y agoI spent quite a bit of time writing my configuration for Phoenix, if you're thinking about writing your own I think you might find starting from mine useful. It's easy to customize, there are gifs in the readme, and it comes packed with features, I hope you'll like it: https://github.com/fabiospampinato/phoenix https://github.com/fabiospampinato/phoenix
- dangson 8y agoThis is fantastic! The readme with animated GIF's is really helping me learn the shortcuts. Thanks for sharing.
- fabiospampinato 8y agoI'm glad you like it! :D
- khirviko 8y agoI’m really happy people are sharing these! +1
- finchisko 8y agoI like the idea of space switcher. Is there any other way of switching spaces than alfred?
- fabiospampinato 8y agoOne could take a similar approach to mine, but use the list of spaces in an application other than Alfred, or just use the shortcuts macOS provides. I'm not aware of any already available alternative.
- guzik 8y agoIs it possible to set window 'Always on Top' with Phoenix?
- tambourine_man 8y agoAfter many ours spent on several scriptable window managers I've settled on Spectacle, which is a lot less powerful, but proved to be enough for me, while being dead easy and hassle free.
- jaaames 8y agoDitto. It's brilliant and one of the things stopping me switching to linux at this point.
- deleted 8y ago[deleted]
- azhenley 8y agoI've been shopping around for something like this. I currently just use BetterTouchTool with Windows-like shortcuts for window management.
- maksimum 8y agoIs anyone aware of configurations that mimic i3wm using Phoenix/Hammerspoon or modifications to Amethyst?
- PowerGuido87 8y agoThis is really cool. Is there anything like that for Windows?
- jkcjkc82 8y agoAutoIT is similar to this.
- fouc 8y agoWow. The named spaces switcher seems promising to me. I think it would be great to have custom names for spaces, and assign various apps to each space, and then be able to log the time spent in each space to a text file.
- Osiris 8y agoIf you prefer a tiling window manager that is automatic, check out https://github.com/ianyh/Amethyst https://github.com/ianyh/Amethyst .
- kram8 8y agoThat’s nice! Does anyone already have an example to just add Windows like ALT + Tab like behavior? Thx!
- olliej 8y agoHow does windows alt tab differ from cmd tab? (Mostly out of curiosity)
- Vosporos 8y agoHahaha lol I thought Phoenix Framework had suddenly jumped from 1.3 to 2.6
- khirviko 8y agoHah. :)
- Improvotter 8y agoI moved from MacOS to Linux for my desktop machine and still use a Macbook with MacOS on the go. I've tried chunkwm, Spectacle, and a few odd ones on GitHub. But none really come anywhere close to something like i3 on Linux if you're looking for a good window manager. MacOS is just too limited if you really want to have a predefined setup of (work)spaces and window regions.
- eivarv 8y agoHave you tried Amethyst[0]? It's a dynamic, automatic tiling WM for macOS; I enjoy it very much. [0]: https://ianyh.com/amethyst/ https://ianyh.com/amethyst/
- stblack 8y agoThis is so well done. I've looked at some links to examples in the wiki: https://github.com/kasper/phoenix/wiki#examples https://github.com/kasper/phoenix/wiki#examples ...and Garrow Bedrossian's config: https://github.com/garrow/phoenix-configurations https://github.com/garrow/phoenix-configurations ...is da bomb! Others look very good too.
- saagarjha 8y agoHacker News don't do Markdown style links.
- deleted 8y ago[deleted]
- mafredri 8y agoI've been using Phoenix for 2 years straight and it's been pretty smooth sailings. Kasper has done an excellent job maintaining and implementing new features every once in a while, thanks Kasper! My personal configuration is written in TypeScript and I maintain typings for Phoenix as well. I try to find ways to improve my every-day and implement them in Phoenix, things like: moving/resizing windows, coffee timer, monitor brightness, terminal hotkey, etc. In the past I've used it to track what applications I spend my time in or to automatically switch Karabiner-Element profiles based on which monitor is connected. If you're looking for inspiration, feel free to have a look: https://github.com/mafredri/phoenix-config https://github.com/mafredri/phoenix-config https://github.com/mafredri/phoenix-typings https://github.com/mafredri/phoenix-typings
- slowhands 8y agoJust a quick question for current Phoenix users — how is the multiple monitor performance? By that I mean a situation where I'm going from just the MacBook screen to three monitors on one desk to four monitors on another desk. Will it automatically detect how many monitors are present, without having to resort to hardware-specific configurations? This is a killer feature for me on Hammerspoon, but I much rather script with JS than Lua, out of familiarity.
- mafredri 8y agoI'm not entirely sure what you mean with performance, macOS is pretty sluggish at reacting to new monitors anyway. That said, Phoenix has an event for when the screens change, you can use it to react, enumerate the new screens, etc. Something like: Event.on('screensDidChange', () => { const sizes = Screen.all().map(s => s.flippedVisibleFrame()); }) Hope that helps!