0.0
Low commit activity in last 3 years
No release in over a year
A simple utility to integrate and sync your Toggl activity with your Luxafor flag
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.0
>= 0.13.1
>= 12.3
>= 3.0

Runtime

~> 0.1
>= 3.10.6
 Project Readme

Luxafor Toggl Syncer

This is a small utility to synchronise your Luxafor Flag with your Toggl activity

  • The utility will turn your flag red if you're busy tracking time to indicate that you're busy
  • The utility will turn your flag green you have stopped tracking time to indicate that you're free
  • The utility will switch off your flag if you haven't tracked any time within 2 hours to indicate that you're idle

NOTE It might work with other webhook enabled Luxafor devices. I don't have any other ones besides the flag, which is a pretty cool gadget.

Installation

This gem is not meant for integration into a project via a Gemfile. It is meant for running as a standalone utility.

gem install luxafor-toggl

Usage

export LUXAFOR_KEY=abc123 # Get me from your luxafor app webhook settings
export TOGGL_KEY=123abc   # Get me from your toggl user account

luxafor-toggl

Cron Usage

Have it sync once every 2 minutes

*/2 * * * * LUXAFOR_KEY=abc123 TOGGL_KEY=123abc /path/to/luxafor-toggl

Configuration

You can control certain aspects of the utility by setting a few environment variables:

  • LUXAFOR_KEY: Required for controlling your Luxafor flag
  • TOGGL_KEY: Required for reading from your Toggl account
  • LUXAFOR_TOGGL_STATE_FILE: Optional. Default: /tmp/myuser-luxafor-toggl-state.json. Keeps state between runs. Delete this file to reset the utility's state.
  • LUXAFOR_TOGGL_IDLE_TIME: Optional. Default: 7200. Time in seconds before you're considered idle.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/gee-forr/luxafor-toggl. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Code of Conduct

Everyone interacting in the Luxafor::Toggl project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.