![]() Hs.hotkey.bind("alt-shift","tab",function()switcher:previous()end)Īdjust values such as shortcut bindings as you please, and that’s it. Hs.hotkey.bind("alt","tab",function()switcher:next()end) bind to hotkeys WARNING: at least one modifier key is required! Switcher = hs.() - default windowfilter: only visible windows, all Spaces As ever, the Hammerspoon docs are wonderfully clear and easy to follow (take a lesson, Apple!). Instead, I use the code below, which sets up the switcher’s ui as seen in the screenshots here with option tab and option-shift tab for shortcuts, but you can modify the appearance to suit your taste. The default code is a bit ugly for my liking. You can use the default code in hs.window.switcher docs or use mine below. ![]() With Hammerspoon up and running, adding the window switcher is just a case of cutting and pasting some code into your config file, saving it then reloading. But if you’re a regular reader of this blog, you’ll already have installed Hammerspoon after reading my earlier posts on it here and here and here. Another advantage here is that the window switcher will include full screen and non-full screen windows in multiple spaces, which command backtick typically does not handle well, something I find particularly frustrating when using Xcode.Īdding a window switcher is easy and doesn’t require any hacking. This is particularly useful if you have a couple of windows open in several applications, and it is much faster and neater than first using command tab and then command backtick to cycle through an app’s windows. The window switcher allows you to jump between different windows, both those of other apps and the same app with a hotkey like option tab, which sits nicely next to command tab in my muscle memory! timer.If you’re a big fan of the command tab Application switcher, you might enjoy adding a window switcher to your list of keyboard hotkeys. If (current_clipboard = nil and honor_clearcontent) then It prevents the history from keeping items removed by password managers If the pasteboard owner has changed, we add the current item to our history and update the counter.Ĭurrent_clipboard = pasteboard. changeCount() - displays how many times the pasteboard owner has changed // Indicates a new copy has been made Local settings = require( "hs.settings "). Local pasteboard = require( "hs.pasteboard "). Jumpcut: setTooltip( "Jumpcut replacement ") Local pasteOnSelect = false - Auto-type on click If any application clears the pasteboard, we also remove it from the history Local honor_clearcontent = false -asmagill request. ![]() Copies larger than this will have their label truncated and end with "…" (unicode for elipsis. Local label_length = 40 - How wide (in characters) the dropdown menu should be. Local hist_size = 20 - How many items to keep on history If you check too frequently, you will loose performance, if you check sparsely you will loose copies Local frequency = 0.8 - Speed in seconds to check for clipboard changes. > Ng irc suggestion: hs.t("jumpCutReplacementHistory", clipboard_history) "typed" instead of copied to the active clipboard. This means that the selected item will be If you open the menu while pressing option/alt, you will enter the Direct Paste Mode. You can access this history on the menu (Unicode scissors icon).Ĭlicking on any item will add it to your transfer area. It monitors the clipboard/pasteboard for changes, and stores the strings you copy to the transfer area. This is my attempt to implement a jumpcut replacement in Lua/Hammerspoon. apps, 'space ', openApplication( 'Slack ')) ctrl, 'space ', openApplication( 'iTerm ')) alt, 'space ', openApplication( "Finder ")) apps, ', ', openApplication( "System Preferences ")) apps, 'S ', openApplication( "Spotify ")) Any changes made here are automatically reloaded on save. ![]()
0 Comments
Leave a Reply. |