-
Notifications
You must be signed in to change notification settings - Fork 5
/
.thymerc
56 lines (47 loc) · 1.6 KB
/
.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
50
51
52
53
54
55
56
set :timer, 25*60 # 25 minute pomodoros
set :timer_break, 5*60 # 5 minute breaks
set :warning, 5*60 # show warning color in tmux at <5 minutes, 0 to disable
set :warning_color, 'red,bold' # warning color for tmux is red/bold
set :break_color, 'blue' # break color is blue
set :interval, 1 # refresh timer every 1 second
set :tmux, true # turn on tmux integration
set :tmux_theme, "#[fg=mycolor,bg=mycolor]#[fg=%s]%s#[fg=mycolor,bg=mycolor]"
# adds `-t --today` option, which opens a text file in vim
option :t, :today, 'open today sheet' do
`vim -O ~/.thyme-today.md ~/.thyme-records.md < \`tty\` > \`tty\``
end
# adds `-s --seconds num` option, which allows on the fly timer
option :s, 'seconds num', 'run with custom seconds' do |num|
set :timer, num.to_i
@run = true
end
# execute hook before thyme program starts
#before(:all) do
# `mplayer ~/music/flight-of-the-bumble-bee.mp3 &`
#end
module Utils
module_function
def play(file)
`(mpv --no-video #{file} >/dev/null 2>/dev/null &)`
end
def notify(msg)
`(terminal-notifier -message "#{msg}" -title "Pomodoro" &)`
end
end
# execute hook before each pomodoro
before do
Utils.notify("🏃♀️💨")
Utils.play("~/dotfiles/sound/ois/menu_load.wav")
#Utils.play("~/dotfiles/sound/ois/launch_weapon.wav")
end
# execute hook after each pomodoro
after do |seconds_left|
if seconds_left == 0
Utils.notify("🌈✨")
Utils.play("~/dotfiles/sound/ois/incoming_hail.wav")
end
end
# execute hook after thyme program quits
#after(:all) do
# `mplayer ~/music/victory.mp3 &`
#end