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
I think it's the best of these type of projects, and would love to see more people using it / developing and sharing scripts.
- 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
Well 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.
> 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.
Hotkey 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.
Would 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
If 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)
Sorry, 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.
I created a fork of AnyBar with added support for specifying an icon id for any icon from icons8.com and the status icon will change to it. https://github.com/niklasberglund/AnyBar-icons
Just now quickly whipped it together. Needs improvement(error handling and asynchronous downloading) and packages.
I woulde like to point out the awesome PowerPro for Windows, something like an Swiss army knife of desktop automation in Windows --that seems to be under active development: http://powerpro.cresadu.com/xfeatures.htm
Well the PowerPro website was done nearly 20 years ago, while the HammerSpoon one two years ago, so that's mostly where the difference comes from. Also it seems the PowerPro website makes more sense if viewed on a good old 1024x768 resolution.
This. PowerPro is an amazing tool, although somewhat esoteric. What surprises me is that successive Windows releases have not ended making the development impossible. I submitted a pair of plugins more than 10 years ago. I've been surprised to see development is still active, and for what I understand is pretty equivalent to Hammerspoon, including window management, shortcuts, menubars & desktop scripting support.
Does anyone think this could be used to query the desktop Slack app to mirror the information in the dock icon, i.e. "no messages", "messages", "direct messages"?
Great single-purpose tool that does exactly what it advertises. I found AnyBar when searching for a programable menubar indicator. I use it at the end of a particle.io -> ifttt -> node/express/socket.io -> go-lang middleware -> AnyBar pipeline so I don't have to get up to check the only single occupancy restroom at the office.
This app is not listening on 127.0.0.1 — it binds to all interfaces (and on both IPv4 and IPv6 too), and the parent's comment is completely valid. Anyone who can get a UDP packet to your machine can control this.
(The `nc` command in the example is directed at localhost, but that doesn't imply that the app is bound to localhost only, just that it's bound to at least that.)
Unix sockets are a better fit for this sort of thing, as they can be by default restricted to your user, and optionally opened up to others. (i.e., Unix sockets are authenticated) You can always do both (implement Unix sockets and Internet sockets).
Even binding to localhost in general is not completely safe, if a webpage or other apps can be fooled into making the right request. (I think UDP is safe here, but who knows.)
I believe it’s still easier to write a string to a socket than do a full-blown HTTP request. It was designed to be accessible from _anywhere_: bash scripts, build tools plugins, etc. To me single UDP packed seemed like a lowest common denominator
I just started reading the code. I don't write Objective-C, but it looks to me as though it will have some vulnerabilities with how it opens images for the dots (but maybe its some sort of resource opening thing that doesn't have the usual path escape vulnerabilities).
I think it's the best of these type of projects, and would love to see more people using it / developing and sharing scripts.