Module: Minder
- Defined in:
- lib/minder.rb,
lib/minder/task.rb,
lib/minder/frame.rb,
lib/minder/scene.rb,
lib/minder/timer.rb,
lib/minder/config.rb,
lib/minder/period.rb,
lib/minder/version.rb,
lib/minder/help_frame.rb,
lib/minder/application.rb,
lib/minder/idle_period.rb,
lib/minder/break_period.rb,
lib/minder/filter_frame.rb,
lib/minder/search_frame.rb,
lib/minder/message_frame.rb,
lib/minder/task_recorder.rb,
lib/minder/pomodoro_frame.rb,
lib/minder/pomodoro_period.rb,
lib/minder/pomodoro_runner.rb,
lib/minder/quick_add_frame.rb,
lib/minder/database_migrator.rb,
lib/minder/commands/delete_task.rb
Defined Under Namespace
Modules: Commands
Classes: Application, BreakPeriod, Config, DatabaseMigrator, FilterFrame, Frame, HelpFrame, IdlePeriod, MessageFrame, Period, PomodoroFrame, PomodoroPeriod, PomodoroRunner, QuickAddFrame, Scene, SearchFrame, Task, TaskRecorder, Timer
Constant Summary
collapse
- DEFAULT_WORK_PERIOD =
25
- DEFAULT_BREAK_PERIOD =
5
- CONFIG_LOCATION =
ENV['HOME'] + '/.minder.json'
- ASSETS_LOCATION =
File.expand_path(File.dirname(__FILE__) + '/../assets')
- DOING_FILE =
File.join(ENV["HOME"], '.minder', 'doing.txt')
- DONE_FILE =
File.join(ENV["HOME"], '.minder', 'done.txt')
- MIGRATIONS_PATH =
File.expand_path(File.dirname(__FILE__) + '/../')
- DATABASE_LOCATION =
"#{ENV['HOME']}/.minder/database.sqlite3"
- VERSION =
'0.2.2'
Class Method Summary
collapse
Class Method Details
11
12
13
14
15
|
# File 'lib/minder.rb', line 11
def self.formatted_time(seconds)
minutes = (seconds / 60).to_i
seconds = (seconds % 60).round
"#{'%02d' % minutes}:#{'%02d' % seconds}"
end
|
.is_linux? ⇒ Boolean
24
25
26
|
# File 'lib/minder.rb', line 24
def self.is_linux?
RUBY_PLATFORM =~ /linux/
end
|
.play_sound(name) ⇒ Object
17
18
19
20
21
22
|
# File 'lib/minder.rb', line 17
def self.play_sound(name)
command = is_linux? ? 'aplay' : 'afplay'
spawn("#{command} #{ASSETS_LOCATION}/#{name}",
out: '/dev/null',
err: '/dev/null')
end
|
.pry_open(b) ⇒ Object
28
29
30
31
32
|
# File 'lib/minder.rb', line 28
def self.pry_open(b)
Curses.close_screen
require 'pry'
b.pry
end
|