Open joeonit opened 3 weeks ago
https://nikitabobko.github.io/AeroSpace/goodness#use-trackpad-gestures-to-switch-workspaces
Isn’t there any workaround for this, as BetterTouchTool is a paid product?
You can research other tools to create custom trackpad gestures. Here's one such tool, however it's also a paid product.
I would recommend paying for tools that provide value to you.
It's a lot more work, but you could also do this with hammerspoon. Looks like there's a package for hammerspoon to make swipe detection much easier: https://github.com/mogenson/Swipe.spoon
@joeonit Here's a working hammerspoon script, using the 'swipe.spoon' module from my previous comment. It works great - it's a four finger swipe to change workspaces.
You can change it to a 3 (or n) finger swipe by changing the first argument to Swipe:start
. Make sure you disable this gesture in the macos trackpad settings to avoid conflicts.
Swipe = hs.loadSpoon("Swipe")
local AEROSPACE = "/opt/homebrew/bin/aerospace"
function aerospaceExec(cmd)
os.execute("nohup " .. AEROSPACE .. " " .. cmd .. " &")
end
-- use four finger swipe to switch workspace
local current_id, threshold
Swipe:start(4, function(direction, distance, id)
if id == current_id then
if distance > threshold then
threshold = math.huge -- only trigger once per swipe
if direction == "left" then
aerospaceExec("workspace --wrap-around prev")
elseif direction == "right" then
aerospaceExec("workspace --wrap-around next")
end
end
else
current_id = id
threshold = 0.1 -- swipe distance > 10% of trackpad
end
end)
I'll submit a PR to add this to the goodness page later.
Please add support for using the 3-finger touchpad gesture to navigate through active spaces. This would make it easier for users who are mainly reading or viewing content, allowing seamless space switching without relying on keyboard shortcuts. Thank you!