Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lapfelix/ForceTouchVibrationCLI
A very bad CLI interface to make the MacBook's Force Touch Trackpad vibrate
https://github.com/lapfelix/ForceTouchVibrationCLI
cli-interface force-touch swift
Last synced: 3 months ago
JSON representation
A very bad CLI interface to make the MacBook's Force Touch Trackpad vibrate
- Host: GitHub
- URL: https://github.com/lapfelix/ForceTouchVibrationCLI
- Owner: lapfelix
- Created: 2016-11-15T04:23:49.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-15T04:37:28.000Z (almost 8 years ago)
- Last Synced: 2024-04-06T01:51:43.951Z (7 months ago)
- Topics: cli-interface, force-touch, swift
- Language: Objective-C
- Size: 7.81 KB
- Stars: 38
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ForceTouchVibrationCLI
A very bad CLI interface to make the MacBook's Force Touch Trackpad vibrateIt probably shouldn't be used for anything serious, as explained very clearly by Apple [here](https://developer.apple.com/library/content/samplecode/ForceTouchCatalog/Listings/ForceTouchCatalog_MasterViewController_swift.html#//apple_ref/doc/uid/TP40016148-ForceTouchCatalog_MasterViewController_swift-DontLinkElementID_11):
```
/*
Use the `NSHapticFeedbackManager` class to perform alignment haptic
feedback on the Force Touch trackpad.
Note: You can call this even if this Macintosh doesn't have a Force
Touch Trackpad Haptic feedback should be used sparingly. Here we are
performing it when the user aligns the photo to 0 degrees. A more
real world example would be when the user aligns the photo to when
the horizon is level.
Ideally, the velocity of slider value changes would be considered such
that haptic feedback is only performed when the user is trying to find
the alignment point (aka moving slowly). This is left as an exercise
for the reader.
*/
```## Usage
```
Vibrate for 0.5 seconds: vibrate -t 0.5
Vibrate for 30 seconds: vibrate --time 30
Vibrate forever: vibrate
Show help: vibrate --help
```