Hi,
Today we are trying something new. We have since the very first release of Flic received a lot of requests from you about using Flic on other devices than their smartphones. While we have had a beta version of a Linux SDK up for a while, Mac support is something we have always wanted to do.
Unfortunately we do not have the development recourses in order to expand our main application to multiple platforms. This has been bothering us since we know that we, and our customers, are missing out on potentially good use cases. It was due to this that we asked ourself a few days ago wether or not we could add Mac support within just a few days of work. The answer to that question turned out to be “Yes, if we cut the application down to an absolute bare minimum and let our users create the actions on their own”.
So, today we are taking our first small step towards Flic compatibility on Mac OSX with an application that we call HaxWithFlic. This application is very simple and in fact, on its own, does not do much at all. The only thing the app will let you do is to use Flic to trigger scripts on your computer. That’s it, no fancy UI, no user log in, no actions.
This application is available for download on GitHub along with a few sample scripts that we have added to get you going. We kindly ask you to submit your comments/suggestions/issues on GitHub rather than sending in support mails so that we can better keep track of it. You are also welcome to discuss it here on the forum as well. Please note that the application is in an Alpha stage and its functionality in upcoming versions may change without notice. While we do realize that this type of application is not for everyone, we still hope that it will be useful to as many of you as possible. Also, this should work perfectly fine with any Flic button, regardless of the batch it originates from.
Thanks,
Anton @ the Flic team
HaxWithFlic Requirements and Instructions
This app requires OSX 10.10 or above operating systems running on a machine that supports Bluetooth Low Energy. A Bluetooth Low Energy compatible USB dongle can in some cases work as well. Once installed, this application will allow you to connect one Flic button to your Mac computer and then select which scripts that you wish to execute on click
, double click
, hold
, up
and down
.
Important notice:
Since this application will blindly execute the scripts that you tell it to execute, it is very important that you make sure that you know what these scripts do. You need to verify, or have verified by someone who you trust, that the code being executed is not malicious in any way. We will not take responsibility for any harm that you may cause to your machine.
Supported script files
The following files are supported:
- Automator workflows (
.workflow
) - All other files that are executable (
chmod +x a_script.py
) and contains a shebang on its first line (#!/some/path
)
Some examples of supported files:
- AppleScript –
.scpt, .AppleScript
–#!/usr/bin/osascript
- Shell Script –
.sh
–#!/bin/sh
- Ruby Script –
.rb
–#!/usr/bin/env ruby
- Python Script –
.py
–#!/usr/bin/env python
This can of course vary a bit depending on how your Mac is configured.
Installation
- Download the repository by pressing the “Download ZIP” button.
- Mount the dmg file and drag and drop the HaxWithFlic.app to your applications folder.
- When launching the application from the applications folder the first time it will ask you if you want to open a file that was downloaded from the internet. Press open.
- Press on the flic icon in the menu bar and start using the application. For example, press scan if you want to add a new Flic.
Configuration
- Press “Configure scripts..”.
- Add search paths to the scripts you want to launch.
Please note that some actions (like window resizing) requires that you add HackWithFlic to the accessibility list under the privacy settings of your mac. By default the app plays audio notifications on button presses, but these can be turned off by unchecking the “Play audio” option. If you are using the button for tasks that require very low latency then you can lower the latency by checking the “Low latency mode” option, but remember that this will decrease the battery life of your Flic significantly. The low latency mode reduces the latency down to 45ms from the normal 280ms. Notice, however, that these are worst case times and that the expected time is about half of that. The button down event always arrives before any other event, so it can be used for time critical applications.