Permalink
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (40 sloc) 930 Bytes
set :timer, 25*60
set :timer_break, 5*60
set :warning, 5*60
set :warning_color, "red,bold"
set :interval, 1
set :tmux, true
set :tmux_theme, "#[fg=mycolor,bg=mycolor]#[fg=%s]%s#[fg=mycolor,bg=mycolor]"
option :t, :today, 'open today sheet' do
`vim -O ~/.thyme-today.md ~/.thyme-records.md < \`tty\` > \`tty\``
end
option :p, :break, 'start a break' do
run
end
option :b, :break, 'start a break' do
set :timer, 5*60
run
end
option :l, :long_break, 'start a long break' do
set :timer, 10*60
run
end
option :s, 'seconds num', 'run with custom seconds' do |num|
@timer = num.to_i
run
end
option :m, 'minutes num', 'run with custom minutes' do |num|
@timer = num.to_i * 60
run
end
option :r, :reset, 'reset status bar' do
`tmux set-option -g status-bg black`
end
before do
`tmux set-option -g status-bg black`
end
after do |seconds_left|
if @tmux
`tmux set-option -g status-bg magenta`
end
end