/
.thymerc
49 lines (40 loc) · 930 Bytes
/
.thymerc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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