Repository navigation
Expand file tree
/
Copy pathconfig.sample.toml
More file actions
114 lines (97 loc) · 4.48 KB
/
Copy pathconfig.sample.toml
File metadata and controls
114 lines (97 loc) · 4.48 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# ================================================================================
# `comodoro` configuration file.
#
# Loaded from the first valid path among:
# - $XDG_CONFIG_HOME/comodoro/config.toml
# - $HOME/.config/comodoro/config.toml
# - $HOME/.comodororc
#
# Override with `comodoro -c <PATH>` or `COMODORO_CONFIG=<PATH>`. Multiple paths
# can be passed at once, separated by `:`; the first one is the base and the
# rest are deep-merged on top of it.
#
# `comodoro configure` generates an account from one of the presets below, and
# everything else here is written by hand. One server owns a timer and any
# number of clients drive it, so the same account is read by both sides.
# ================================================================================
[accounts.example]
# Use this account when `-a/--account` is not passed.
default = true
# Cycles the timer runs through, in order, each a name and a duration in
# seconds. This is the only required field.
#
# Pomodoro style:
cycles = [
{ name = "Work", duration = 1500 }, # 25 min
{ name = "Rest", duration = 300 }, # 5 min
{ name = "Work", duration = 1500 }, # 25 min
{ name = "Rest", duration = 300 }, # 5 min
{ name = "Work", duration = 1500 }, # 25 min
{ name = "Long rest", duration = 1800 }, # 30 min
]
# 52/17 style:
#cycles = [
# { name = "Work", duration = 3120 }, # 52 min
# { name = "Rest", duration = 1020 }, # 17 min
#]
# 112/26 style:
#cycles = [
# { name = "Work", duration = 6720 }, # 112 min
# { name = "Rest", duration = 1560 }, # 26 min
#]
# Stop the timer after that many full loops. Loops forever when absent.
#cycles-count = 5
# Precision the remaining duration is displayed at: `second`, `minute` or
# `hour`.
precision = "minute"
# --------------------------------------------------------------------------------
# Local socket transport
# --------------------------------------------------------------------------------
#
# The transport that needs no port, guarded by filesystem permissions. Also
# spelled `unix-socket` for accounts written against Comodoro 1.x.
#
# Every field below has a default, so this table adjusts an address rather than
# switching a transport on: which one a server binds is what `comodoro server
# start [TRANSPORTS]` decides.
# Path the server binds and the clients connect to. Defaults to comodoro.sock
# inside $XDG_RUNTIME_DIR, or the platform temporary directory when that
# variable is unset. Give each account its own path to run several timers.
#socket.path = "/run/user/1000/comodoro.sock"
# Pick this transport when a command names none. Already the case when neither
# transport claims the default, so this only matters against `tcp.default`.
socket.default = true
# --------------------------------------------------------------------------------
# TCP transport
# --------------------------------------------------------------------------------
#
# Defaulted like the socket, so `comodoro server start tcp` opens a port on an
# account that says nothing about TCP. The listener is unauthenticated: whoever
# reaches the port drives the timer, so keep it on loopback and start it only
# when you want it.
# Host and port the server binds and the clients connect to.
#tcp.host = "127.0.0.1"
#tcp.port = 9999
# Pick this transport when a command names none. Ignored when `socket.default`
# is set as well.
#tcp.default = true
# --------------------------------------------------------------------------------
# Hooks
# --------------------------------------------------------------------------------
#
# Reactions bound to timer events by name: `on-{cycle}-{event}` where the cycle
# is the kebab-case cycle name and the event one of begin, running, set, pause,
# resume, end. The timer itself fires `on-timer-start` and `on-timer-stop`.
#
# A hook that cannot run, exits non-zero or reaches no notification daemon is
# logged and left there: nothing a hook does can stop the timer.
# A command given as a string runs through the platform shell, so pipes,
# redirections and globs work.
#hooks.on-work-begin.command = "echo 'Work started!' >> /tmp/comodoro.log"
# A command given as an array executes directly, with no shell involved, so no
# quoting rule applies beyond the kernel exec rules.
#hooks.on-work-begin.command = ["notify-send", "Comodoro", "Work started!"]
# A notification is sent to the system notification daemon. Requires the
# `notify` cargo feature, enabled by default.
hooks.on-work-begin.notify.summary = "Comodoro"
hooks.on-work-begin.notify.body = "Work started!"