Jens Krause
e2cd536079
Introduce CalendarDuration ( #120 )
...
* trait ClockDuration, CalendarDuration, tests
* make clock rendering more generic
* remove `should_blink` from `RenderClockState`
* pass less down: `mode` -> `editable_time`
* simplify `event` duration states
* remove deprecated `DirectedDuration`
* fix comments
2025-10-09 19:51:34 +02:00
Jens Krause
99032834be
(cli)! Remove --countdown-target argument ( #121 )
...
Reverts #112 .
For targeting a date (past/future) a new `event` feature will be
introduced (soon).
2025-10-08 18:03:06 +02:00
Jens Krause
f79813ac6b
feat(event) Add widget ( #117 )
...
* skeleton
* make `Event` widget work
2025-10-05 21:05:14 +02:00
Jens Krause
eb376e4015
feat(args): accept years and days for --countdown ( #114 )
2025-10-01 15:26:02 +02:00
Jens Krause
ac2863cebc
upgrade deps ( #113 )
...
* run `cargo upgrade`
```sh
❯ cargo upgrade
Checking timr-tui's dependencies
name old req compatible latest new req
==== ======= ========== ====== =======
tokio 1.45.1 1.47.1 1.47.1 1.47.1
tokio-util 0.7.15 0.7.16 0.7.16 0.7.16
tracing-subscriber 0.3.19 0.3.20 0.3.20 0.3.20
clap 4.5.40 4.5.48 4.5.48 4.5.48
time 0.3.41 0.3.44 0.3.44 0.3.44
thiserror 2.0.12 2.0.17 2.0.17 2.0.17
Upgrading recursive dependencies
Locking 0 packages to latest Rust 1.90.0 compatible versions
note: pass `--verbose` to see 2 unchanged dependencies behind latest
note: Re-run with `--incompatible` to upgrade incompatible version requirements
note: Re-run with `--verbose` to show more dependencies
incompatible: 4 packages
latest: 8 packages
```
* fix(duration) `test_parse_duration_by_time` panics
2025-10-01 13:34:20 +02:00
Jens Krause
3f4acec9f5
feat(args): parse countdown by given time (past or future) ( #112 )
...
* feat(args): parse `countdown` by time
* fix lint
No `Default` for `AppTime` needed...
* app: pass `countdown_until` down
* fix `parse_duration_by_time` and `parse_duration`
to handle different formats they support
* fix(countdown): percentage panics
`Duration::ZERO` needs to be considered
* `DirectedDuration`
* fix comment
* rename arg: `countdown-target`
* `ss`->`mm`, fix formats, update README
* alias `--ct`
2025-10-01 12:40:27 +02:00
Jens Krause
2277eeb033
feat(localtime): date ( #111 )
...
* feat(localtime): date
* update demo
2025-09-30 13:24:45 +02:00
Jens Krause
cb6c2d5142
feat(edit): 10x up/down ( #110 )
...
* feat(edit): 10x up/down
* fix `MAX_DURATION` (decisecond)
* footer: add `edit 10x` keybindings
* README: update keybindings
2025-09-30 12:38:25 +02:00
Jens Krause
6dc7eb81c2
fix(editable): auto jump to next possible editable while decreasing, but ignoring zero values ( #109 )
...
* extract `format_by_duration`
* fix(editable): switch to next ignoring zero values
2025-09-29 20:48:19 +02:00
Jens Krause
816741f842
improve format handling + fix days rendering ( #107 )
...
* render_(format) functions, compact `YyyDddHhMmSs`
* compact rendering of other formats
* add `YDHhMmSs`+`YDdHhMmSs` formats
* tests for `YDHhMmSs`+`YDdHhMmSs`
* `YyDHhMmSs` + `YyDdHhMmSs`
* `YyyDHhMmSs` + `YyyDdHhMmSs`
* fix `edit_up` to compare `years` properly
and add `test_edit_up_overflow_protection`
* fix rendering `Format::YyyDdHhMmSs`
2025-09-29 16:08:34 +02:00
jk
40eb602953
tests
2025-09-28 10:40:34 +02:00
jk
d5bf7f32a6
feat(timer|c-dwn): show/edit years + days
2025-09-28 10:40:34 +02:00
jk
9ff65e5c8e
feat(duration): days and years
2025-09-28 10:40:34 +02:00
Jens Krause
901cf69472
feat(screen): LocalTime ( #90 )
2025-08-30 21:48:56 +02:00
Jens Krause
c494f0e829
refactor(footer): AppTimeFormat data handling ( #89 )
...
- Extract local state of `app_time_format` from `footer` to have it globally available
- Add a deserialization fallback for deprecated `AppTimeFormat::Hidden`
- Persist `footer_app_time` toggle state
2025-08-27 19:44:02 +02:00
jk
5bc37f005f
lint again
...
in addition to #88 , especially 78f5269
2025-06-28 11:49:21 +02:00
Jens Krause
bfa40fd8f1
Rust 1.88.0 ( #85 )
...
* Rust 1.88.0
* nix flake update
* cargo upgrade
* lint
all `uninlined_format_args` related
@see https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2025-06-28 11:39:22 +02:00
Jens Krause
d27587a44a
fix(pomodoro): ctrl+r resets rounds + both clocks ( #83 )
2025-05-20 10:01:29 +02:00
Jens Krause
5f4c5bb8ed
(pomodoro) reset active clock only ( #82 )
...
It reverts changes of cc35f20f3e
2025-05-13 11:00:56 +02:00
Jens Krause
44af71c01c
(args) set content by given duration ( #81 )
2025-05-12 12:14:27 +02:00
jk
aae5c38cd6
fix(footer): hide option to save initial value
...
for timer. Available 4 pomodoro + countdown only.
2025-05-06 11:25:29 +02:00
Jens Krause
52ed8267be
(pomodoro/countdown) Change initial value ( #79 )
...
- While editing, an user can apply changes as a new initial value (pomodoro/countdown only).
- New keybinding: `[^s]save initial value`
- Update keybinding: `[s]ave changes` (instead of `[Enter]`)
- Refactor event handling to re-structure `edit` / `non-edit` modes.
- Refactor footer to reflect latest keybindings
2025-05-02 12:39:26 +02:00
jk
6b068bbd09
fix(pomodoro) add empty line to keep content
...
centered vertically comparing to other views (which have one label below the clock only)
In addition to #75 .
2025-04-30 14:27:30 +02:00
Jens Krause
e6291a3131
Update keybindings ( #76 )
...
* (pomodoro) reset both clocks at once
* quit app by pressing `q` only
* (countdown) enter/esc keybindings
* (timer) enter/esc keybindings
* (pomodoro) enter/esc keybindings
* update footer label
* fix(coundown): don't reset elapsed clock
while skipping editing changes
* fix(clock): order of actions matters for ESC
handling. Set `pause` instead of `initial` mode while toggeling back.
* fix(timer): order of actions matters (ESC key)
* (footer) update order, lowercase standard keys
2025-04-30 11:11:33 +02:00
Jens Krause
90d9988e7a
(pomodoro) count WORK rounds ( #75 )
2025-04-29 16:20:02 +02:00
Jens Krause
5b445afe25
fix(countdown): reset MET while editing by local time ( #72 )
2025-04-13 21:17:56 +02:00
Jens Krause
d9399eafc9
fix(countdown): Reset MET if countdown is set by cli arguments ( #71 )
...
* fix: Reset MET if countdown is set by args
* update CHANGELOG
2025-03-03 12:21:17 +01:00
Jens Krause
3d9b235f12
Rust 1.85.0 + Rust 2024 Edition (#68 )
...
- Add `rust-toolchain.toml`
- Refactor `flake` to consider `rust-toolchain.toml`, especially Rust version
- `just`: Add run-sound command
- Ignore sound files
- Format
2025-02-25 20:30:20 +01:00
jk
e094d7d81b
feat(logging): add --log arg to enable logs
...
and/or to pass a custom log directory.
2025-02-06 20:33:52 +01:00
Jens Krause
843c4d019d
set_panic_hook (#67 )
2025-02-06 11:16:04 +01:00
Jens Krause
e95ecb9e9c
feat(notification): Animate (blink) clock entering done mode ( #65 )
...
Optional.
2025-02-05 19:29:56 +01:00
Jens Krause
886deb3311
fix(notification): remove callbacks in favour of mpsc messaging ( #64 )
2025-02-05 13:35:24 +01:00
Jens Krause
7ff167368d
--features sound (#63 )
...
to enable `sound` notification for local builds only. Needed to avoid
endless issues by building the app for different platforms. Sound
support can be hard.
2025-02-04 17:39:50 +01:00
Jens Krause
a54b1b409a
feat(clock): sound notification (experimental) ( #62 )
2025-02-04 17:28:41 +01:00
Jens Krause
8f50bc5fc6
AppEvent (#61 )
...
Extend `events` to provide a `mpsc` channel to send `AppEvent`'s from
anywhere in the app straight to the `App`.
2025-02-04 15:05:02 +01:00
Jens Krause
d3c436da0b
feat: native desktop notifications (experimental) ( #59 )
...
* desktop notification by entering `Mode::DONE` for `countdown` and `pomodoro`
* remove redundant `on_done_called` check
* remove build warning (release only)
* log notification errors
* cli arg to enable desktop notifications
* persistant notification settings
* ctrl shortcut
* update changelog
* max timer notification
2025-01-28 19:28:34 +01:00
Jens Krause
6d2bf5ac09
Edit countdown by local time ( #49 )
2025-01-13 18:44:56 +01:00
Jens Krause
9ea9f88266
feat(countdown): persist elapsed time ( #46 )
2025-01-10 16:01:03 +01:00
Jens Krause
c8af76c9e5
feat(countdown): rocket countdown ( #45 )
2025-01-08 18:52:18 +01:00
Jens Krause
468b4a5abf
simplify style settings, improve naming ( #44 )
...
* simplify style settings by passing `style` directly to Widgets. No need to store it in `state` of widgets.
* remove unneeded things
* naming (state vs. widgets)
2025-01-07 19:02:57 +01:00
Jens Krause
8603a823e4
fix(footer): 12-hour format incl. tests ( #43 )
2025-01-06 19:22:02 +01:00
Jens Krause
94bdeeab11
feat(footer): show local time ( #42 )
2025-01-06 18:31:22 +01:00
Jens K.
847367f51e
Prepare publish ( #39 )
...
* refactor!: rename `.data` and `.log` files
- `timr.data` -> `app.data`
- `timr.log` -> `app.log`
* refactor!: rename app name `timr` -> `timr-tui`
* docs: update README (paths, names, installation)
* update Cargo.toml
* fix(release): warning: unused variable: `log_dir`
2025-01-02 12:16:56 +01:00
jk
f3a6e073e2
don't restrict countdown edit
...
(see #33 )
2025-01-01 18:51:24 +01:00
jk
e4dcf61153
move parse_duration into duration module
2025-01-01 18:23:19 +01:00
Jens K.
a4f8885eb1
feat(cli): arg --menu ( #37 )
...
- Add `--menu` to args
- Add `--version` to args
- Change default behavior: At a first run of the app, the menu will be shown by default (similar to what @tschinz suggested in #33 ). However, if an user hides the menu later and closes the app, the menu will be hidden again with a next start. Just because the app restores the last app state.
2025-01-01 15:13:10 +01:00
Jens K.
e674314207
fix(cli): invalid format of --help output ( #36 )
2025-01-01 14:51:12 +01:00
Jens K.
7312ad51d8
fix: use data_local_dir if state_dir not found ( #31 )
...
Fixes #30
2024-12-30 19:56:27 +01:00
jk
88293898f6
clippy
2024-12-28 13:23:38 +01:00
jk
7206714f96
extract Content into common
2024-12-28 13:18:43 +01:00