I made this Touch Bar gesture to scroll through Spotify or iTunes tracks. You could always make it work for other apps too.
Make two widgets (left & right) with 2/3/4/5 finger gesture and any modifiers you want.
Set predefined action to applescript in background. Use this script:
-- Scroll through Spotify or iTunes track on bttWidgetSliderMoved(percentageMoved) ifapplication "Spotify" is running then tellapplication "Spotify" set SongPos to player position -- of current track set player position to (SongPos + percentageMoved * 100) endtell elseifapplication "iTunes" is running then tellapplication "iTunes" set SongPos to player position -- of current track set player position to (SongPos + percentageMoved * 100) endtell endif end bttWidgetSliderMoved
I've set mine to 2 Finger Swipe Left & Right with Shift modifier, with Repeats after position has changed 1%. So, if I hold down shift & use 2 fingers on the Touch Bar to swipe right, it skips through the current song 1 second for every 1% moved relavtive to the Touch Bar surface. Swipe left, and it moves backwards through the song. Lets me scroll through a song faster or slower and more easily than if I created a button to skip ahead/back every 5 or so seconds.
Nice widget! I implemented it in my touchbar . The only thing I miss is to see in which second of the song you are in each moment while scrolling (or maybe the remaining seconds). Any idea on how to add this?