minder 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +69 -22
- data/lib/minder/message_frame.rb +15 -5
- data/lib/minder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18952931e5d56fa60dc91450c5bc0b5c5974282b
|
4
|
+
data.tar.gz: 896a0d60b7d397cb2e16aab17ad2b4c75255d10a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e0d0eaff178279943d076f53fbecaf5f5d2281b3898b5889049bcb50d8b133a2bdf6205d1f58c523ac0c3bb4756b6f4828fae64e49431d9c4d865faad55f5fe
|
7
|
+
data.tar.gz: a29a6687c15c71b38a770191ebaad1432a2545aeaf123255005854d12f775c4440806a72f80f3dd5c374f256cdc173b2c861f8336c9817b68a9187d7452ca7f4
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[![Gem
|
2
|
+
Version](https://badge.fury.io/rb/minder.svg)](http://badge.fury.io/rb/minder)
|
3
|
+
|
1
4
|
## What is it?
|
2
5
|
|
3
6
|
This is a CLI-based tool that combines the best of several different
|
@@ -11,40 +14,84 @@ At present it has these features:
|
|
11
14
|
soothing sounds of a "pomodoro" kitchen timer at the beginning and end of a
|
12
15
|
break.
|
13
16
|
- A todo log that allows starting, unstarting and completing a task.
|
14
|
-
-
|
17
|
+
- Ability to filter tasks by a string (useful for focusing on [Getting Things
|
18
|
+
Done](http://gettingthingsdone.com/)-style labels like @context and +project.
|
19
|
+
- Ability to jump through tasks using a Vim-like search.
|
15
20
|
|
16
21
|
Plans for the future include:
|
17
22
|
|
18
|
-
- Filtering by [Getting Things Done](http://gettingthingsdone.com/)-style labels (like @context, +project, and #tag)
|
19
23
|
- Integration with a website blacklist tool like
|
20
24
|
[SelfControl](https://github.com/SelfControlApp/selfcontrol/).
|
21
25
|
- Keeping track of the number of pomodoros performed during a day.
|
22
26
|
- Desktop notifications for Linux and MacOS
|
23
|
-
- Prompts to summarize plans for the day and day's end progress, inspired by
|
27
|
+
- Prompts to summarize plans for the day and day's end progress, inspired by
|
28
|
+
[Day One](http://dayoneapp.com/).
|
24
29
|
|
25
30
|
Audio files are from https://github.com/niftylettuce/pomodoro-timer
|
26
31
|
|
32
|
+
## Installation
|
33
|
+
|
34
|
+
You must have a version of Ruby that is 2.1 or higher.
|
35
|
+
|
36
|
+
Install with
|
37
|
+
|
38
|
+
``` bash
|
39
|
+
gem install minder
|
40
|
+
```
|
41
|
+
|
27
42
|
## Usage
|
28
43
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
|
44
|
+
### Command line
|
45
|
+
Start the program by running `minder`
|
46
|
+
|
47
|
+
### Interface
|
48
|
+
|
49
|
+
Minder is designed to be run in a separate pane in a Tmux session (or in
|
50
|
+
a split inside a program like iTerm2). The tasks list will scroll if there is
|
51
|
+
not enough room to display all tasks.
|
52
|
+
|
53
|
+
The interface is organized into frames. You can switch between frames by
|
54
|
+
pressing Tab. The commands for each frame only work when the frame is focused.
|
55
|
+
|
56
|
+
- The Pomodoro timer frame. Press space to begin the next period.
|
57
|
+
- The Tasks frame. This frame minimizes during a Pomodoro period to avoid
|
58
|
+
distraction. The commands for interacting with the message frame are based on
|
59
|
+
Vim keystrokes:
|
60
|
+
- `/` to open a dialog to search within the list of tasks.
|
61
|
+
- `d` to mark a task as done.
|
62
|
+
- `e` to edit the whole tasks list in your `$EDITOR`.
|
63
|
+
- `f` to open a dialog to filter the list of tasks.
|
64
|
+
- `gg` to go to top of task list and `G` to go to bottom of list.
|
65
|
+
- `j` to do down the list and `k` to go up.
|
66
|
+
- `m` to minimize the tasks frame.
|
67
|
+
- `n` to go to next search result and `N` to go to previous search result.
|
68
|
+
- `s` to start a task.
|
69
|
+
- `u` to un-start a task.
|
70
|
+
- `x` to delete a task.
|
71
|
+
- The Quick Add Task frame. Enter text here to add a task to the tasks list at
|
72
|
+
any time.
|
73
|
+
|
74
|
+
### Data
|
75
|
+
|
76
|
+
The tasks are stored in an sqlite3 file that by default is located at
|
77
|
+
`~/.minder/database.sqlite3`.
|
78
|
+
|
79
|
+
Minder also generates a couple text files as a form of backup in case the
|
80
|
+
sqlite file gets corrupted: `~/.minder/doing.txt` and `~/.minder/done.txt`
|
81
|
+
|
82
|
+
## Design notes
|
83
|
+
|
84
|
+
This program is intentionally idiosyncratic. It is designed for a particular
|
85
|
+
workflow and set of use cases that make sense to me. Specifically it is
|
86
|
+
designed for someone who works in a maximized terminal all day, using Vim
|
87
|
+
keybindings for both text editing and for moving between Vim splits and Tmux
|
88
|
+
panes (using the excellent
|
89
|
+
[vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator)). The
|
90
|
+
main goal is to avoid switching to a GUI program or opening a website in order
|
91
|
+
to add a task or see the Pomodoro status.
|
92
|
+
|
93
|
+
If you do find this program useful feel free to make feature requests or better
|
94
|
+
yet open pull requests.
|
48
95
|
|
49
96
|
## License
|
50
97
|
|
data/lib/minder/message_frame.rb
CHANGED
@@ -76,15 +76,20 @@ TEXT
|
|
76
76
|
def desired_height
|
77
77
|
return 3 if minimized?
|
78
78
|
|
79
|
+
# TODO: figure out what this magic 3 number is
|
79
80
|
header_text_lines.length + tasks_text_lines.length + 3
|
80
81
|
end
|
81
82
|
|
82
83
|
def allocated_tasks_height
|
83
|
-
height - header_text_lines.length
|
84
|
+
height - header_text_lines.length - 3
|
84
85
|
end
|
85
86
|
|
86
87
|
def offset_tasks_text
|
87
|
-
tasks_text_lines[
|
88
|
+
tasks_text_lines[visible_tasks_range].join("\n")
|
89
|
+
end
|
90
|
+
|
91
|
+
def visible_tasks_range
|
92
|
+
(scroll_offset..(allocated_tasks_height + scroll_offset - 1))
|
88
93
|
end
|
89
94
|
|
90
95
|
def doing_message
|
@@ -100,10 +105,14 @@ TEXT
|
|
100
105
|
end
|
101
106
|
end
|
102
107
|
|
108
|
+
def total_tasks_height
|
109
|
+
task_manager.tasks.length
|
110
|
+
end
|
111
|
+
|
103
112
|
def scroll_offset
|
104
|
-
position = task_manager.selected_task_index +
|
105
|
-
if
|
106
|
-
|
113
|
+
position = task_manager.selected_task_index + 1
|
114
|
+
if position > allocated_tasks_height
|
115
|
+
position - allocated_tasks_height
|
107
116
|
else
|
108
117
|
0
|
109
118
|
end
|
@@ -137,6 +146,7 @@ TEXT
|
|
137
146
|
when ' '
|
138
147
|
if minimized?
|
139
148
|
unminimize
|
149
|
+
self.height = 5 # TODO: this is hacky, to avoid an exception
|
140
150
|
:redraw
|
141
151
|
end
|
142
152
|
end
|
data/lib/minder/version.rb
CHANGED