Hax-with-flic For Mac

Hax-with-flic For Mac

I've had success with Hax with Flic, but it requires your Mac to be running to receive the event. So if you shut down your computer, or it's a laptop.

Join GitHub today

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account


commented May 8, 2017


I am noticing a noticeable delay of about 1-2 seconds when using haxwithflics on both my iMac and Macbook. There is no delay however when using the newer flics app for iOS. Since I use flic mostly for running scripts switching to the newer app is not an option for me.

commented May 8, 2017

This is very strange. It should be fast. Could you please try and select the 'lowLatency' mode and then place the script on buttonDown only? That should give you the best possible latency. If it is still slow after doing this then we need to find out wether the latency is on the button events themselves or if the script is slow. Maybe try a few different scripts for comparison. Let me know how it goes!

commented May 8, 2017


I just tried using button down and it's working with almost no noticeable delay. Using 'low latency' improves it even more! :)


closed this May 8, 2017

commented May 8, 2017

Cool! Remember that you will always get a little bit more delay on regular click types as it takes a little while to distinguish between click/doubleClick/hold.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

This is a basic app for Mac that integrates with Flic buttons.

The application allows you to execute your own scripts on Flic button presses. This requires OSX 10.10 or above operating systems running on a machine that supports Bluetooth Low Energy. It is unclear exactly which machines that have Bluetooth Low Energy support, but Apple supposedly started the transition around 2012. Running the following in a terminal will output the Bluetooth LMP Version:

Version 0x6 was the first one that supported Low Energy, but we cannot guarantee that this will be correct for all computers. Using a Bluetooth Low Energy compatible USB dongle should also work if it is just configured correctly.

R for Mac OS X. This directory contains binaries for a base distribution and packages to run on Mac OS X (release 10.6 and above). Mac OS 8.6 to 9.2 (and Mac OS X 10.1) are no longer supported but you can find the last supported release of R for these systems (which is R 1.7.1) here. R for mac sierra. R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues.

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.

How it works

This application will allow you to connect multiple Flic buttons to your Mac computer and then select which scripts that you wish to execute on click, double click, hold, up and down.

Supported script files

The following files are supported:

  • Automator workflows (.workflow)
  • All 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.


  1. Download the repository by pressing the 'Download ZIP' button.
  2. Mount the dmg file and drag and drop the HaxWithFlic.app to your applications folder.
  3. 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.
  4. 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.


  1. Press “Configure scripts.”.
  2. 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. You can turn off the audio notifications 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.


We have added a few pre-made scripts that you can find in this repository. All of them are very small and should be self explanatory. If you have any cool scripts of your own that you believe could be useful to other people, then feel free to submit a pull request on this repository.


  • removeDuplicateLines.sh Goes through your clipboard and removes all duplicate lines.
  • reverseLines.sh Goes through your clipboard and reverses the characters on each line.
  • sortLines.sh Goes through your clipboard and sorts all lines.
  • textToSpeech.sh Takes the contents of your clipboard and plays it using text to speech.


  • interactiveScreenshot.sh Lets you select an area of your screen that you want to take a screenshot of. Resulting image is saved to your desktop folder.
  • maximizeApplicationWindow.sh Maximizes the size of the frontmost window of the active application.
  • screenshot.sh Takes a screenshot of your full desktop. Resulting image is saved to your desktop.
  • splitApplicationWindows.AppleScript Resizes the two frontmost windows of your active application and displays them side by side.


  • copyPathToClipboard.AppleScript Copies the path of the selected item in your frontmost finder window to your clipboard.
  • moveSelectedFilesToFolder.AppleScript Lets you move the selected items in your frontmost finder window to a different location.


  • currentDateToClipboard.AppleScript Copies the current time and date to your clipboard.
  • currentDateToClipboardAndPaste.AppleScript Same as above but also pastes to your active application.
  • displayCurrentDateInDialog.AppleScript Displays a dialog window with the current time and date.
  • saveClipboardToFile.AppleScript Lets you save the contents of the clipboard to a new file at a location that you choose.
  • startCalculator.AppleScript Launches the Mac Calculator app.
  • displaysleep.sh Shuts down the display, system continues to run in the background. (Added by jonashoechst)
  • sleep.sh Puts system to sleep, no network working anymore. (Added by jonashoechst)


  • chrome-CloseFrontWindow.AppleScript Closes the frontmost chrome window. This closes all tabs in that window.
  • chrome-Reload.AppleScript Reload the selected tab of the frontmost chrome window.
  • chrome-ShowSourceFile.AppleScript Opens a new tab showing the source code of the selected tab of the frontmost chrome window.


  • hue_switch.sh Toggle all your Philips Hue lights on/off. (Added by patricks)
  • hue_all_off.rb Turns off all lights. (Added by patricks)
  • hue_all_on.rb Turns on all lights. (Added by patricks)
  • hue_switch.rb Switches the current state of all lights. (Added by patricks)


  • keynoteNextSlide.sh Display next slide. This actually only simulates a keypress on the space key.
  • keynotePreviousSlide.sh Display previous slide. This simulates a press on the p-key.


  • spotify-NextTrack.AppleScript Moves to the next track. Also works with Spotify connect.
  • spotify-PlayPause.AppleScript Play or Pause the music. Also works with Spotify connect.
  • spotify-PreviousTrack.AppleScript Moves to the previous track. Also works with Spotify connect.
  • pauseSpotifyAndSleep.sh Pauses Spotify if a track is currently playing and then puts mac to sleep. (Added by echo0101)


Mac os x sierra 2017 torrent

Notice: All Sonos scripts requires that you find the IP address of your Sonos and then change the script accordingly.

  • sonos-NextTrack.sh Skip to next track in your current playing playlist.
  • sonos-Pause.sh Pause the playback.
  • sonos-Play.sh Play the previously paused playback.
  • sonos-PlayPauseToggle.sh Toggle between play and pause.
  • sonos-PreviousTrack.sh Skip to the previous track in your current playing playlist.


  • vlc-Fullscreen.AppleScript Toggle fullscreen.
  • vlc-Mute.AppleScript Toggle mute.
  • vlc-NextPlaylistItem.AppleScript Jump to next item in playlist.
  • vlc-PlayPause.AppleScript Toggle play/pause.
  • vlc-PreviousPlaylistItem.AppleScript Jump to previous item in playlist.
  • vlc-StepBackward.AppleScript Step backward. Step length can be configured.
  • vlc-StepForward.AppleScript Step forward. Step length can be configured.
  • vlc-StopPlayback.AppleScript Stop the current playback.
  • vlc-VolumeDown.AppleScript Decrease volume by one step. Step length can be configured.
  • vlc-VolumeUp.AppleScript Increase volume by one step. Step length can be configured.
Hax-with-flic For Mac
© 2020