惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
D
DataBreaches.Net
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
Microsoft Security Blog
Microsoft Security Blog
B
Blog
U
Unit 42
有赞技术团队
有赞技术团队
博客园 - 聂微东
GbyAI
GbyAI
宝玉的分享
宝玉的分享
F
Full Disclosure
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MyScale Blog
MyScale Blog
Jina AI
Jina AI
Martin Fowler
Martin Fowler
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
P
Proofpoint News Feed
A
About on SuperTechFans
I
InfoQ
博客园 - 【当耐特】
C
Check Point Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog
Project Zero
Project Zero
WordPress大学
WordPress大学
小众软件
小众软件
AWS News Blog
AWS News Blog
博客园 - 司徒正美
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 热门话题
I
Intezer
Engineering at Meta
Engineering at Meta
C
CXSECURITY Database RSS Feed - CXSecurity.com
J
Java Code Geeks
T
Tenable Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes

Ben Frain

So, you want a React modal that uses the <dialog> element and transitions in AND out? Scroll indicators on tables with background colours using animation-timeline Review: SoundPEATS Clip1 Open ear clip-on headphones VS Code – highlight just the active indent guide Review: MoErgo Go60, a split ergonomic and fully programmable keyboard Review: Kinesis mWave mechanical ergonomic and programmable keyboard iOS26 Safari theme-color/tab-tinting with fixed position elements is a mess New Book: Responsive Web Design with HTML5 and CSS, 5th Edition Use @supports with a proxy feature/value for features you can’t test for (@starting-style) First adventures in View Transitions Review: Benq Screenbar Pro and Halo lightbars. The kit you never knew you needed! Center items in a container, and make then left aligned when they overflow A single element CSS donut timer/countdown timer, that can sit on any background Review: Open Ear Headphones – Bose Open Ultra v Huawei FreeClip In search of the perfect autocomplete for CSS Managing multiple versions of node, without NVM or additional tools Review: Keychron Q14 Max Alice 96 Key mechanical keyboard NEW VIDEO COURSE: Responsive Web Design with HTML5 and CSS Is CSS Grid really slower than Flexbox? Review: Advantage360 Pro Signature Edition 2024 mechanical ergonomic keyboard More Keys or Fewer Keys for mechanical keyboards Yes! You can use position: sticky and overflow together Neovim – how to do project-wide find and replace? Review: Keyboardio Model 100, split, wooden, mechanical keyboard Struggling to learn SwiftUI How to create rounded gradient borders with any background in CSS How to get equal size icons in the cmp completion menu of Neovim with Kitty terminal Review: Dygma Defy, split, mechanical, programmable ergonomic keyboard What’s the best way to reset WAAPI chained animations? Using CSS @property inside shadowRoot (web components) workaround Dynamically create a ref for items when iterating over them in lit.dev templates Selecting and pausing running animations in Lit Web Components New Web APIs — a popover on top of a dialog element can’t be interacted with? Review: ZSA Voyager, split, mechanical keyboard Russel Brand, narcissism, and a sadly common pattern… When it comes to text editors, I feel like Goldilocks Simple settings for writing and converting markdown with Sublime Text Review: The ZSA Platform tenting kit for the Moonlander keyboard Logitech MX Master 3/3s scroll wheel fix Building a line graph with CSS clip-mask Review: Dell 6K 32″ Monitor U3224KBA I broke my keyboard! Swapping the key switches in the Kinesis Advantage360 Pro Adding to $PATH for a central location for Neovim/NPM tools Neovim Power Tips: Volume 2 Review: MoErgo Glove80, split, wireless, columnar ergonomic keyboard with RGB Review: Kinesis Advantage 360 Pro — split ergo mechanical keyboard Review: Dactyl Manuform – an ergonomic, custom built mechanical keyboard How to animate along an SVG path at the same time the path animates? Getting the context of Web Components (lit)
HUGE macOS Productivity boost: Set-up simple, keyboard only, instant App switching and arrangement
Ben Frain · 2023-04-19 · via Ben Frain

I want to share a way of working, which, using just your keyboard enables you to not only move the windows of an application around with ease, but crucially, switch between applications too.

Want to watch a video version of this? It’s on my YouTube channel here: https://youtu.be/s6vIP_1GrE4

So, as I have things currently, I can press:

Hyper + k for Kitty (my preferred Terminal/Neovim)

Hyper + g for Google Chrome

Hyper + c for Sublime Text

Hyper + p for Final Cut Pro

Hyper + f for Finder

Hyper + s for Safari

The mnemonic can obviously suit however suits you best.

So that’s opening and switching. Then I can manage the window size and position too.

Here are the window size and positioning shortcuts I have:

Hyper + 1 puts the application 1920 * 1080 at the top left (for HD screen recordings) Hyper + 3 for the first third Hyper + 6 for the second two thirds Hyper + 9 for the last third Hyper + arrows move the window to one side or another of the screen. If you have multiple screens, press it again at one side of the screen and it will move to the next screen Hyper + 0 makes the window maximised

No more alt-tab, no more dragging windows to the correct position; I never do that any more! Plus with this method there is no slow annoying transition; it’s instant.

To accomplish this I use a couple of tools. Neither are expensive, but if you are very price sensitive, you may be able to substitute for cheaper alternatives which I’ll mention shortly. However, the two I use are Rectangle Pro, which is £8.29 for me in the UK and Alfred with the Powerpack which costs £34. I find those two help my productivity in so many ways, I’m totally happy with the cost.

There are a few tools you can probably accomplish this same approach with; you might prefer to use Keyboard Maestro and Raycast for example. Whichever you choose the goal remains the same. You want to be able to open or switch to your most used apps with a single keypress, and position the windows of said apps just as easily.

Setup Rectangle

Let’s look at Rectangle Pro first, as that’s the easy part. This is where we set moving any window to where we want it.

Inside Preferences, you want to use Keyboard Shortcuts, and then go down the list, setting any of the existing window sizes to something that makes sense to you. I have mine set to Hyper plus Left or Right arrows to move a window to either side, then Hyper and a number for other splits. I only ever tend to have thirds so I have Hyper + 6 for the first two thirds, Hyper + 9 for the last third, and Hyper + 0 for maximise. To move a Window to a second display, I just press Hyper + Right or Left an extra time and Rectangle handles sending it on to the next display.

GUI of the Rectangle app for macOS
Set whatever custom window layout you like

If you want something very specific, Rectangle can handle that. Use the Custom Shortcuts section, click the plus, and set your preference. I have Hyper +1 to open a 1920*1080 window, starting at the top left of the display. You can obviously use this to do whatever you like.

Setup Alfred

The Alfred part can seem a little more involved but it doesn’t take long and then you never have to touch it.

We want to set some shortcuts to either open an application when triggered, or if it is open already, focus it. That way we can switch between applications without moving our hands from the mouse.

Open the Alfred Preferences, and click on Workflows.

GUI of the Alfred app in macOS
You can have as many of these as you want.

What I tend to do is right-click, choose Triggers, and then Hotkey. Then you want to record your shortcut, so I’ll do Hyper + C. Make sure that is set to Pass through to workflow. That’s your shortcut setup. Now we need to link that shortcut to an Action. Right-click again and choose, Actions, Launch Apps/Files, and you will get a Finder like window. Click the little plus at the bottom right, and browse to the Application you want you shortcut to open. Then choose Open and then Save. Now all you need to do is link the two. Select your shortcut, hold down the Option/alt key and click on the Launch Apps box you want to link it to. That’s it. If you try that shortcut now, it should open the app in question, or focus it if already open.

Now, I only use a few different Applications, so all of mine I have managed to map to Hyper and a single key, such as Hyper + k for Kitty, or Hyper + F for Finder. You do you and map it to something that makes sense for you.

Once that is in place you now have the means to open and switch to any of your most used apps but also resize their windows and send them to other displays with absolute ease.

Conclusion

I’ve found this approach absolutely wonderful, and I find it far more effective and simple than something like Yabai or Hammerspoon. I know they aren’t doing exactly the same thing, and I do appreciate that you can do things like Sway in the macOS space but what I have here is very low hassle and makes me incredibly productive.

Give it a whirl and let me know how you find it.