Tagdidchange notification hammerspoon11/21/2023 I have some translate_ keys set up for certain language pairs for when this doesn’t quite work (I don’t think I’ve ever needed them). Super useful! Usually, Google’s auto-detect feature works fine, so the translate_to_ keys are sufficient. It allows me to select some text and, with a keystroke, translate it to any of three languages using Google Translate. I live in Switzerland, and my German is far from perfect, so the PopupTranslateSelection spoon helps me a lot. At last I created a dummy workflow in Alfred 2 and successfully registered these keystrokes as triggers.- Install:andUse("BetterTouchTool", ) Pop-up translation Reply to this email directly or view it on GitHub:įor what it's worth, I tried to bind ctrl+left/right in Zephyros and got some errors in the logs that binding the keystrokes failed. Sounds pretty much like GC after all.Įven though the code snippet above will run on its own, here's my complete setup if this helps: I'm going to create a hotkey binding for displaying the state and assign the eventtap to a variable. Reply to this email directly or view it on GitHub #400 (comment). A plugin to add launchable apps/scripts, making Seal act as a launch bar. Adds a hotkey to reload the hammerspoon configuration, and a pathwatcher to automatically reload on changes. A spoon that let you bind sequential bindings. There are no errors in the log, it just seems that the handler stops at some point. Im putting this up for anyone who wants to take a look at it - Im still testing it, so wont be pushing it into core for a bit, but its worked flawlessly for me for the last half day if anyone. Implements push-to-talk and push-to-mute functionality with fn key. Now I'm having the problem that the eventtap randomly stops working. On Oct 4, 2015, at 2:04 PM, Patrick Stadler wrote: In cleaning up hs. if it doesn't, then a random garbage collection that occurs just as the eventtap is disabled but before we detect this and restart it could be the culprit.Īt any rate, add the variable and let me know what affect, if any, that has. hs.notify:additionalActions must also be used for this method to have any effect. Notes: This method has no effect unless the user has set Hammerspoon notifications to Alert in the Notification Center pane of System Preferences. if it is, that would prevent gc and we're back to not knowing. The notification object, if an argument is present otherwise the current value. I'll look at the source later and see if its storing the eventtap in the registry or not. If that returns false, then its been stopped, but I'm not sure why since unless you request the stop explicitly (or it is garbage collected during a reload or Hammerspoon quitting) it should restart itself.Īctually, since you're not capturing the eventtap in a variable, it might be garbagecollection. " before the hs.eventtap.new command and when it stops, check if it is enabled with "myEventTap:isEnabled()" but our code catches this, restarts the tap, and should log something like this:ġ0/4/15 12:03:55.947 AM Hammerspoon: CGEventRef eventtap_callback(CGEventTapProxy, CGEventType, CGEventRef, void *) line 23 $ eventtap restarted: (-2)Ĭapture the event tap in your code in a variable (stick something like "myEventTap =. I do know that the OS will send a message to the eventtap that it has been disabled if it takes too long, low memory, too far behind, etc. If a notification does not have a title attribute set, OS X will not display it, so by default it will be set to 'Notification'. Thanks for this great app, keep up the good work! stop propagation return true end): start() In cleaning up hs.notify and adding some features that were previously missing (including an image, scheduled notifications, maybe a few others) its becoming increasingly obvious to me that if you modify the properties of a notification. Local spacesModifiers =, string.format( "%d ", nextSpace)) My solution is to use Hammerspoon to invert the entire display’s colors and keep flashing the display until I switch back to the terminal window. If we have a valid menubar, we set it up. I’ve found that my brain is not great at noticing desktop notifications, since they tend to be in the top-right corner of a large display. Open the clipboard history, file manager, and main search window of Alfred. Many apps give you the ability to set a hotkey in their preference panes for certain 'global' tasks. arrangeDesktop hs.loadSpoon ('ArrangeDesktop') ('info') menubar hs.menubar.new () These initial lines load the spoon, set its default logging level, and creates a new menubar. Hammerspoon translates that local binding as if I'm pressing +. Local spacesModifier = "ctrl " local spacesCount = spaces. Next, we need to modify your Hammerspoon a to load the spoon and add its menu items.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |