5 ms·
I'll be that guy on this thread that points out Hammerspoon. It's an OS X automation tool that replaces pretty much every OS X 'tweak' style application out the
by NickBusey 10y ago
I'll be that guy on this thread that points out Hammerspoon. It's an OS X automation tool that replaces pretty much every OS X 'tweak' style application out there. http://www.hammerspoon.org/go/#simplemenubar http://www.hammerspoon.org/go/#simplemenubar
I think it's the best of these type of projects, and would love to see more people using it / developing and sharing scripts.
- notyourwork 10y agoThis looks really flexible, thanks for sharing.
- sooheon 10y agoCare to share your implementation of your favorite feature? I'm finding it hard to picture what the workflow/result will be like.
- NickBusey 10y agoWell for one I do use the Caffeine feature that is shown in the section of the Getting Started guide I linked to. That replaced the actual Caffeine app. I have a timer running reminding me to take breaks every so often, that replaced Time Out. I have it auto-detect when I plug into my keyboard at home, and when I do it turns on my bluetooth to pair with my mouse, when I unplug, it turns off the bluetooth. This prevents the annoying issue of my mouse constantly connecting/disconnecting when I'm using my computer in a different room. I have it watching wifi events and automatically setting my volume to 0 when I leave my home wifi network, to prevent any accidental sound blares when I open my laptop in a meeting. Finally I have it bound to some custom hot keys to move/resize my windows around my external monitors. That function replaces the zillion window management apps out there.
- prashnts 10y ago> bound to some custom hot keys to move/resize my windows around my external monitors iTerm2's hotkey is pretty terrible in my opinion. I've bound this function to make it work for me: function iTermHotkeyHandler() local iterm = hs.application.get('iTerm2') if (iterm) then local window = iterm:mainWindow() if not window then if iterm:selectMenuItem('New Window') then window = iterm:mainWindow() end return end if iterm:isFrontmost() then iterm:hide() else window:focus() end end end hs.hotkey.bind('cmd', 'space', iTermHotkeyHandler) *me: I really should put these in some gist somewhere.
- paublyrne 10y agoWhat don't you like about iTerm's show/hide function?
- prashnts 10y agoHotkey windows do not show up in cmd+tab switcher. It's annoying if you activate the hotkey with cmd+space, press cmd+tab to go to previous window, and instinctively press cmd+tab hoping to get back to the terminal window. But that doesn't happen.
- paublyrne 10y agoOK I understand what you mean. I've never found that to be a problem for me but I'm glad you were able to come up with a solution.
- gnachman 10y agoWould you mind filing a bug? The next version is focused on hotkey window improvements and this is very easy to fix. I'm away from my machine now or I'd do it myself. Thanks! ITerm2.com/bugs
- prashnts 10y agoIf one likes being cheap, it's fun to mute Spotify if there's an Ad. Yeah... function muteSpotifyOnAd() if (hs.spotify.isRunning()) then if (hs.spotify.getCurrentTrack():lower() == 'spotify') then hs.spotify.setVolume(0) else hs.spotify.setVolume(100) end end end hs.timer.doEvery(10, muteSpotifyOnAd)
- maxwelljoslyn 10y agoNice one!
- Griffinsauce 10y agoNo thanks, one likes earning a few cents from their published music.
- kuschku 10y agoSpotify still gets paid by the advertiser, and so does the artist. It’s like switching TV channels when the ad plays. In analog media, close to no one ever listened to / watched ads, due to exactly that – many VHS recorders would even automatically skip them.
- mypalmike 10y ago> close to no one ever listened to / watched ads I can still sing jingles I learned from watching TV ads in the 70s.
- mastax 10y agoDoesn't spotify pause the ad if the volume is zero? It does for me.
- tra3 10y ago- A scratch pad window that appears on Hyper-S. It appends stuff to my scratch.txt. - Hyper-1 through 5 to defer tasks in OmniFocus (calls out to an external script). - Hyper-W to lock my screen. - Hyper-M to mute skype microphone. - Hyper-[C,T,X,F] to focus Chrome, TaskPaper, nvAlt and iTerm.
- semi-extrinsic 10y agoHuh, it's like someone wrote an app that's the non-WM part of Awesome WM for OSX. Never thought I'd see that.
- jsjohnst 10y agoI hadn't heard of Hammerspoon before your reply, but man I'm glad you posted. This nails a need of mine and looks very useful overall. Thanks!
- dcgoss 10y agoLooks really interesting, thanks. Does anyone know if there is anything similar to Hammerspoon out there?
- JadeNB 10y ago> Does anyone know if there is anything similar to Hammerspoon out there? Did you forget to include some extra constraint? As written, it looks like the answer to your question is "Yes, Hammerspoon."
- dcgoss 10y agoSorry, I realize that is unclear. What I was getting at is just if there are any other similar scripting/automation apps out there, perhaps with a different scripting language or other application integrations. I am a newbie in the automation space so I was wondering what other types of apps people may be using.
- mastax 10y agoYou may be interested in AppleScript or AutoHotKey.
- tarp 10y agoHammerspoon is forked from mjolnir https://github.com/sdegutis/mjolnir https://github.com/sdegutis/mjolnir
- bosie 10y agoAnd I will be that guy on this thread pointing out Keyboard Maestro ; https://www.keyboardmaestro.com/main/ https://www.keyboardmaestro.com/main/ One thing i couldn't replicate yet in hammerspoon (among other things) is clicking: https://wiki.keyboardmaestro.com/action/Find_Image_on_Screen https://wiki.keyboardmaestro.com/action/Find_Image_on_Screen incredibly useful
- NickBusey 10y agoWhat is an example of something you would use that feature for?
- bosie 10y agoI use it to (random incomplete list): - switch recipients in Franz.app - click on menubar items - import current page into devonthink (requires a click on a toolbar item to start the automation) - toggle flux (click on menubar item and go down etc) - adding tags in delibar (click on the Nth suggested tag) - click on toolbar items in all possible apps when there is no keyboard shortcut/menu item available