1/10/2023 0 Comments Hammerspoon mission control![]() ![]() This works because MacOS window compositor paints first the desktop background, and afterwards paints the windows on top. I organize my work by vrtual desktops and instead of alt-tabbing applications I quick switch virtual desktops.Īs MacOS doesn’t display the active desktop when you switch, I resorted to numbered backgrounds to help me navigate. This is effective only if you open only a few apps simultaneously. MacOS wants you to use meta-tab or mission control to switch windows. Use numbered wallpapers instead of meta-tab / mission control Os.execute("/usr/local/bin/cmus-remote -r") Hs.alert.show("Going to previous song on CMUS") Hs.alert.show("Going to next song on CMUS") Os.execute("open -nF /Applications/iTerm.app") Hs.alert.show("Opening iTerm2 using Lua") Os.execute("open -nF /Applications/Alacritty.app") Hs.alert.show("Opening Alacritty using Lua") In Mac I use Hammerspoon as an xbindkeys replacement, mainly to for shortcuts to open new terminals at any place and time. I like to use a lot of virtual desktops, with hordes of terminals open at the same time. I understand why most people may find this behavior useful, but this is just not compatible with my workflow. Mac detects there is another instance and changes the focus to it instead of.Open a terminal using the Finder or the Dock or a Launcher.Terminal multiplexers get very useful when the OS offers a miserable CLI experience.įor example lets check out what MacOS does when you try to open multiple instances of a terminal: These are my recommendations: Use HammerspoonĪfter some time suffering MacOS defaults, I got to understand why Tmux is so popular in between MacOS powerusers. You need to learn to live with MacOS limitations and find hacks and workarounds to make your life as comfy as it is on Linux. There is no way to set autofocus (focus follows the mouse and doesn’t raise windows). In Mac you need to use the mouse all the time, you cannot launch more than one terminal instance, and there is no way to organize a large collection of desktops and windows. My first days working on MacOS in late 2016 were a painful experience because Mac lacks personalization and doesn’t adapt well to my workflow. Mac has a feeling similar to Linux, but it is not as versatile. The flawless bluetooth support, spotlight, the quick region screenshot keystroke and the solid airplay features are all fantastic. MacOS has a few terrific features I love. Use numbered backgrounds to ease desktop navigation.Use BetterTouchTool for window management.Use Hammerspoon for shortcut keys and launch terminals.You will hit ulimit limits very quickly so checkout the workaround to increase the defaults here.Of course, this may all be irrelevant with the Magic Toolbar… Copyright © 2003–2022 Kevin Marsh. ![]() instead of Brightness, Volume, etc.) I picked F7 through F12 so the markings on the keys matched the functionality. You have to change the Keyboard System Preferences to intrepret the top row as F1, F2, etc. defaultOutputDevice () output : setVolume ( output : volume () + 10 ) end end ) volumeUp () else output = hs.audiodevice. bind (, "f12", function () playing = hs.spotify. Remap media keys to Spotify-priority equivalents hs.hotkey. F11/F12 to adjust the volume of Spotify if playing, otherwise adjust the system volume.F8 to play/pause Spotify only (sometimes iTunes or something would randomly launch before).With this little bit of code in my ~/.hammerspoon/a file I can use: Hammerspoon to the rescue! (For those not in the know, Hammerspoon allows you to write Lua scripts to control your Mac with a really great “standard library” of functions to control things like window positions, volume, running AppleScript, etc.) After probably 600 times of doing this I decided to fix it. Out of habit, I would use the volume keys on my Mac to adjust the volume only to change the system volume and not affect Spotify at all. A few months ago I started using the Mac app on my laptop to control the speakers connected to a PC in my office.Įverything works pretty well, except for the volume. One of Spotify’s best features is its ability for a client to become a remote to another version of itself running on a different device. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |