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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d3bb704ef7bbbaf670aa6c01a75f9d4ace56221
4
- data.tar.gz: 41f3146a0eb4e3bf5e5c6dc888da140ec11c3f17
3
+ metadata.gz: 18952931e5d56fa60dc91450c5bc0b5c5974282b
4
+ data.tar.gz: 896a0d60b7d397cb2e16aab17ad2b4c75255d10a
5
5
  SHA512:
6
- metadata.gz: 8971ca075bd358670ce4c20cc899a7dff932dd8c65c892d94bc93587fe5dad671b4d1c93aa2a2cb4b3e12760659b282dd6a8daf0e6ebd73835bd34b2e28704c9
7
- data.tar.gz: bb76e15c41ade70bb628f23c4f4901e8952109d1dade39d143eee81a519b6df075ace8208fc8b52783c67fb219e788567d95a4d5e06fc91561dea917517703e8
6
+ metadata.gz: 6e0d0eaff178279943d076f53fbecaf5f5d2281b3898b5889049bcb50d8b133a2bdf6205d1f58c523ac0c3bb4756b6f4828fae64e49431d9c4d865faad55f5fe
7
+ data.tar.gz: a29a6687c15c71b38a770191ebaad1432a2545aeaf123255005854d12f775c4440806a72f80f3dd5c374f256cdc173b2c861f8336c9817b68a9187d7452ca7f4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minder (0.2.beta3)
4
+ minder (0.2)
5
5
  activesupport (~> 4.2, >= 4.2.1)
6
6
  curses (~> 1.0, >= 1.0.1)
7
7
  rom (~> 0.7, >= 0.7)
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
- - Stores a simple text log of task and pomodoro activity (in `~/.minder/done.txt`).
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 [Day One](http://dayoneapp.com/).
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
- Minder is designed to be run in a separate pane in a Tmux session (or in a split
30
- inside a program like iTerm2). The tasks list will scroll if there is not enough
31
- room to display all tasks.
32
-
33
- There are three sections. You can switch between sections by pressing Tab. The
34
- commands for each section only work when the section is focused.
35
-
36
- - The Pomodoro timer section. Press space to begin the next period. Press 'e'
37
- to edit the whole tasks list in your `$EDITOR`.
38
- - The Tasks section. This section disappears during a Pomodoro period to avoid
39
- distraction.
40
- - Press 'd' to mark a task as done.
41
- - Press 'x' to delete a task.
42
- - Press 's' to start a task.
43
- - Press 'u' to un-start a task.
44
- - Press 'j' to do down the list and 'k' to go up.
45
- - Press 'gg' to go to top of task list and 'G' to go to bottom of list.
46
- - The Quick Add Task section. Enter text here to add a task to the tasks list.
47
- at any time.
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
 
@@ -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[scroll_offset..(allocated_tasks_height + scroll_offset - 4)].join("\n")
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 + 5
105
- if height - position < 0
106
- (height - position).abs
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
@@ -1,3 +1,3 @@
1
1
  module Minder
2
- VERSION = '0.2'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minder
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Method