https://github.com/dtinth/thyme_osx_ui
Mac OS X Status Bar Integration for Thyme
https://github.com/dtinth/thyme_osx_ui
objective-c ruby
Last synced: about 1 month ago
JSON representation
Mac OS X Status Bar Integration for Thyme
- Host: GitHub
- URL: https://github.com/dtinth/thyme_osx_ui
- Owner: dtinth
- License: mit
- Created: 2014-10-10T04:36:29.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-14T05:41:13.000Z (over 11 years ago)
- Last Synced: 2025-01-23T19:48:08.645Z (over 1 year ago)
- Topics: objective-c, ruby
- Language: Ruby
- Homepage:
- Size: 152 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# OS X Status Bar Integration for [Thyme](http://thymerb.com/)
This Gem adds OS X status bar integration to [Thyme](http://thymerb.com/) (a hackable console-based pomodoro timer),
allowing you to always see the remaining time.

This works by compiling an Objective-C code that simply displays the text passed via standard input on the status bar when you install the gem, so make sure you have `clang` installed.
:mushroom::alien::cloud::octopus::snail::x::shoe::turtle::angel::trollface::umbrella::star2::bread::apple::rabbit::icecream::nose::tomato::elephant::gun::rabbit2::ant::tomato::icecream::octopus::nose::fish::octopus::rabbit::turtle::heart::yum::mailbox::eyeglasses::rabbit::bike:
## Installation and Usage
First, install the gem:
```bash
gem install thyme_osx_ui
```
Then, modify your `.thymerc` by adding `before`, `tick`, and `after` hooks as follows:
```ruby
require 'thyme_osx_ui'
before do
$ui = ThymeOSX::UI.new
end
tick do |seconds_left|
$ui.tick(seconds_left)
end
after do |seconds_left|
$ui.destroy
end
```
Now whenever you start a pomodoro with `thyme`, you should see a status bar item.
Clicking on it and selecting "void" will kill the pomodoro.
:moon::angel::cat::octopus::snowman::x::sheep::trollface::angel::trollface::umbrella::star2::banana::angel::rabbit::icecream::nail_care::turtle::eyeglasses::ghost::rabbit2::angel::tomato::icecream::octopus::nose::floppy_disk::octopus::rabbit2::trollface::horse::yum::mushroom::eyes::rocket::balloon:
Customization
-------------
You can subclass the class `ThymeOSX::UI` and override these methods:
- `emoji(seconds_left)` — to change the emoji icon.
- `text(seconds_left)` — to change the text, which include the emoji and time left.
- So if you want to keep the emoji, you must call `emoji(seconds_left)` yourself.