eqqert.blogg.se

Hammerspoon examples
Hammerspoon examples






hammerspoon examples
  1. #Hammerspoon examples code#
  2. #Hammerspoon examples mac#
  3. #Hammerspoon examples windows#

I just hold Right Command and press X without any mental effort because I know I have no other app starting with X.Īnd if I forgot that Xcode is not already running (or if it crashes in the background like it sometimes does), rcmd launches it automatically (since I clearly wanted it running if I tried to focus it). I decided to dynamically assign each app the first letter of its name so that I don’t have to try to remember what key did I assign to Xcode?. So I turned it into a dedicated app switching key. My right thumb rests nicely on the Right Command key and I barely use that easy to reach key. That’s the main reason I created rcmd, to switch apps without thinking about switching apps. But doing that 50 times a day and having to always visually check if I chose the right icon, tends to break my flow of thinking, and makes me get tired faster because of all the context switching. Pressing Tab 5 times in a row to get to the app I want could be categorized as a first world problem and I should just get used to it. The app centric approach is nice but having to switch between 10 different apps at a time gets annoying fast.

#Hammerspoon examples windows#

Of course it might just be the power of habit, after all I was able to be just as productive with the Windows way in the past ¯\_(ツ)_/¯ # Command Tab Tab Tab Tab… No need to see a thumbnail of each window, when almost all apps are single window.Minimizing windows that are irrelevant at the moment allows me to cycle through the relevant ones with Command backtick.

#Hammerspoon examples code#

I might want to keep my code editor app running even after I closed all its windows, so I can have it load instantly when opening a new window to edit a file/project.There’s a very small subset of apps where I might have more than one window (code editor, image/PDF viewer).I mostly switch between apps with a single window (browser, terminal etc.).Now, after 6 years, the macOS way feels a lot more intuitive: The app vs window distinction just didn’t exist in my mind. Suddenly I was closing all windows of Sublime but its icon was still there in the Command Tab list, or I would minimize Chrome and focusing its icon didn’t unminimize it. Six years ago I was a Windows power user, and when I got my first Mac, Command Tabbing through apps felt very weird. When an app with multiple windows is focused, Command backtick will cycle through the windows of that app. well, windows, on macOS you Command Tab through apps by default. As opposed to Microsoft Windows where you just Alt-Tab through.

hammerspoon examples

There’s an important distinction between switching windows and switching apps on the Mac. Well it turns out it’s pretty darn hard, and I’m still working on this window switching thing to this day. I remember something about Accessibility permissions not being available in the sandbox, but I just used an App Store app that was able to request the permissions so there has to be a way, how hard could it be? I don’t even care why anymore, let’s just release this fix on the App Store.Īnd while I’m at it, why not try to add that window switching capability that people have been asking about? Run open /System/Volumes/Data/Applications/Firefox.app, huh? no websites load? THAT WAS IT?!Īdd path.replacingOccurrences(of: "/System/Volumes/Data", with: ""), build, run, hold Right Command, press F, Firefox launches and holy cow everything works!! or was it the other way around? Anyway let’s just try it for the sake of it, I’m desperate. Try open /Applications/Firefox.app in a terminal, it works, websites load as expected.īreakpoint on launchApp, check the debugger again, let’s be rigorous, what am I really calling open on?Īrgument is /System/Volumes/Data/Applications/Firefox.app which is just a symlink to /Applications/Firefox.app right?. Launch Xcode, open the rcmd project, check the launchApp function code, it’s just a NSWorkspace.open call on Firefox.app, what does Alfred do differently?ĭisassemble Alfred.app in Hopper, look for NSWorkspace.open, of course it’s there, it’s the exact same thing. Please fix ASAP!! I’m gonna fix this Firefox issue once and for all! Not without annoying workarounds and a confusing user experience.Īnother email, another annoyed user: Firefox not loading websites when launched through rcmd! It works when launched from Alfred. I tried revamping that from inside the confines of an App Store app.

hammerspoon examples

#Hammerspoon examples mac#

Home Blog Notes Stuff Contact Résumé RSS A window switcher on the Mac App Store? Is it even possible? Focusing a specific window on macOS felt too cumbersome.








Hammerspoon examples