Rebind some basic commands
This commit is contained in:
parent
27468185c1
commit
50ac26e398
3 changed files with 23 additions and 8 deletions
|
|
@ -18,13 +18,13 @@ The three available categories of task are `Permanent Items`, for tasks that wil
|
||||||
|
|
||||||
### The 'View Entries' Interface
|
### The 'View Entries' Interface
|
||||||
|
|
||||||
Pressing `v` on the main interface will take the user to the interface for viewing actual time entries, as created from the main interface. The default view is the 'day' view, which shows your entries for the current day. You can press `g` to `group` or `ungroup` your tasks by project. You can also navigate using `h,j,k,l` between entries, entries grouped by project, grouped by day, or all entries. You can press `y` to copy the selection to your clipboard.
|
Pressing `v` on the main interface will take the user to the interface for viewing actual time entries, as created from the main interface. The default view is the 'day' view, which shows your entries for the current day. You can press `p` to `group` or `ungroup` your tasks by project. You can also navigate using `h,j,k,l` between entries, entries grouped by project, grouped by day, or all entries. You can press `g` to go to the top entry or `G` to go to the bottom entry. You can press `y` to copy the selection to your clipboard.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Weekly and Monthly View
|
### Weekly and Monthly View
|
||||||
|
|
||||||
When in the `view` interface, you can switch to a weekly or monthly view using `w` or `m`. Grouping works the same way in these views as in the `daily` view. You can also press 'r' to reverse the order of the days in the display.
|
When in the `view` interface, you can switch to a weekly or monthly view using `w` or `m`. Grouping works the same way in these views as in the `daily` view (use `p` to toggle grouping). You can also press 'r' to reverse the order of the days in the display.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ Otherwise, just download the latest release for a relatively-stable binary.
|
||||||
| `Enter` | Start/stop timer |
|
| `Enter` | Start/stop timer |
|
||||||
| `n` | New entry (project + optional tag) |
|
| `n` | New entry (project + optional tag) |
|
||||||
| `p` | Reassign project for selected item |
|
| `p` | Reassign project for selected item |
|
||||||
| `v` | View Watson log (d/w/m period, g group, e edit, x delete, y copy) |
|
| `v` | View Watson log (d/w/m period, p group, g/G nav, e edit, x delete, y copy) |
|
||||||
| `x` | Delete entry |
|
| `x` | Delete entry |
|
||||||
| `Ctrl+e` | Edit task config (`state.yaml`) |
|
| `Ctrl+e` | Edit task config (`state.yaml`) |
|
||||||
| `c` | Edit app config (`config.yaml`) or show config help |
|
| `c` | Edit app config (`config.yaml`) or show config help |
|
||||||
|
|
|
||||||
14
src/app.rs
14
src/app.rs
|
|
@ -594,10 +594,22 @@ impl App {
|
||||||
(LogViewSelection::All, LogViewGrouping::ByDate) => LogViewSelection::Day,
|
(LogViewSelection::All, LogViewGrouping::ByDate) => LogViewSelection::Day,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
KeyCode::Char('c') => {
|
KeyCode::Char('y') => {
|
||||||
self.copy_log_to_clipboard()?;
|
self.copy_log_to_clipboard()?;
|
||||||
}
|
}
|
||||||
KeyCode::Char('g') => {
|
KeyCode::Char('g') => {
|
||||||
|
// Go to top entry
|
||||||
|
self.log_view_selected = 0;
|
||||||
|
self.log_view_selection_level = LogViewSelection::Entry;
|
||||||
|
self.update_log_view_scroll();
|
||||||
|
}
|
||||||
|
KeyCode::Char('G') => {
|
||||||
|
// Go to bottom entry
|
||||||
|
self.log_view_selected = self.log_view_frame_indices.len().saturating_sub(1);
|
||||||
|
self.log_view_selection_level = LogViewSelection::Entry;
|
||||||
|
self.update_log_view_scroll();
|
||||||
|
}
|
||||||
|
KeyCode::Char('p') => {
|
||||||
// Toggle grouping mode
|
// Toggle grouping mode
|
||||||
self.log_view_grouping = match self.log_view_grouping {
|
self.log_view_grouping = match self.log_view_grouping {
|
||||||
LogViewGrouping::ByDate => LogViewGrouping::ByProject,
|
LogViewGrouping::ByDate => LogViewGrouping::ByProject,
|
||||||
|
|
|
||||||
11
src/ui.rs
11
src/ui.rs
|
|
@ -354,13 +354,14 @@ fn render_help(frame: &mut Frame, app: &App) {
|
||||||
"Log View (press 'v'):",
|
"Log View (press 'v'):",
|
||||||
"Once in log view, you can:",
|
"Once in log view, you can:",
|
||||||
"- Switch time periods: d (day), w (week), m (month)",
|
"- Switch time periods: d (day), w (week), m (month)",
|
||||||
"- Toggle grouping: g (by date or by project)",
|
"- Toggle grouping: p (by date or by project)",
|
||||||
"- Toggle day order: r (newest first ↔ oldest first)",
|
"- Toggle day order: r (newest first ↔ oldest first)",
|
||||||
"- Change selection: h/l (entry → project → day → all)",
|
"- Change selection: h/l (entry → project → day → all)",
|
||||||
"- Navigate: j/k to move through selections",
|
"- Navigate: j/k to move through selections",
|
||||||
|
"- Go to top/bottom: g/G (go to first/last entry)",
|
||||||
"- Edit entry: e (entry level only)",
|
"- Edit entry: e (entry level only)",
|
||||||
"- Delete entry: x (entry level only)",
|
"- Delete entry: x (entry level only)",
|
||||||
"- Copy to clipboard: c (works at all levels)",
|
"- Copy to clipboard: y (works at all levels)",
|
||||||
"- Press ? for detailed log view help",
|
"- Press ? for detailed log view help",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -933,7 +934,7 @@ fn render_log_view_help(frame: &mut Frame, app: &App) {
|
||||||
"- m: Switch to Month view (last 31 days)",
|
"- m: Switch to Month view (last 31 days)",
|
||||||
"",
|
"",
|
||||||
"Grouping:",
|
"Grouping:",
|
||||||
"- g: Toggle between grouping by Date or by Project",
|
"- p: Toggle between grouping by Date or by Project",
|
||||||
" - By Date: Shows all entries chronologically",
|
" - By Date: Shows all entries chronologically",
|
||||||
" - By Project: Groups entries by project within each date",
|
" - By Project: Groups entries by project within each date",
|
||||||
"",
|
"",
|
||||||
|
|
@ -957,6 +958,8 @@ fn render_log_view_help(frame: &mut Frame, app: &App) {
|
||||||
"- h/l or ←/→: Change selection level",
|
"- h/l or ←/→: Change selection level",
|
||||||
" - l (right): Zoom in (All → Day → Project → Entry)",
|
" - l (right): Zoom in (All → Day → Project → Entry)",
|
||||||
" - h (left): Zoom out (Entry → Project → Day → All)",
|
" - h (left): Zoom out (Entry → Project → Day → All)",
|
||||||
|
"- g: Go to top entry",
|
||||||
|
"- G: Go to bottom entry",
|
||||||
"- PageUp/PageDown: Jump 10 entries (Entry level only)",
|
"- PageUp/PageDown: Jump 10 entries (Entry level only)",
|
||||||
"",
|
"",
|
||||||
"Selection Levels (use h/l to change):",
|
"Selection Levels (use h/l to change):",
|
||||||
|
|
@ -971,7 +974,7 @@ fn render_log_view_help(frame: &mut Frame, app: &App) {
|
||||||
"- x: Delete the selected entry (Entry level only)",
|
"- x: Delete the selected entry (Entry level only)",
|
||||||
"- b: Backfill - set entry start time to previous entry's end time",
|
"- b: Backfill - set entry start time to previous entry's end time",
|
||||||
" (Entry level, By Date view only)",
|
" (Entry level, By Date view only)",
|
||||||
"- c: Copy selection to clipboard (works at all levels)",
|
"- y: Copy selection to clipboard (works at all levels)",
|
||||||
" Copies based on current selection level",
|
" Copies based on current selection level",
|
||||||
"",
|
"",
|
||||||
"Visual Indicators (By Date view only):",
|
"Visual Indicators (By Date view only):",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue