pomotty 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](./README.md) | 日本語
4
4
 
5
- Node.js 22以降で利用できる、ターミナル用のポモドーロタイマーです。
5
+ Node.js `^22.18.0 || >=24.11.0`で利用できる、ターミナル用のポモドーロタイマーです。
6
6
 
7
7
  ```shell
8
8
  npx pomotty
@@ -40,6 +40,49 @@ pomotty --loop 5
40
40
  pomotty --work=25 --break=5 --loop=2
41
41
  ```
42
42
 
43
+ タイマー実行中は、残り時間を大きな数字で表示し、同じ位置で更新し続けます。
44
+ その下に、現在のフェーズの経過バー(経過時間・割合・合計時間)と、サイクルごとの
45
+ 作業・休憩の進み具合を並べたタイムラインを表示します。
46
+
47
+ ```text
48
+ 🍅 WORK Cycle 2 / 3
49
+
50
+ ██████ ██ ██ ██████
51
+ ██ ██ ██ ██ ██ ██
52
+ ██████ ██████ ██████
53
+ ██ ██ ██ ██ ██
54
+ ██████ ██ ██████
55
+
56
+ ━━━━━━━━━━━━━━━━────────────────────────
57
+ 6:18 elapsed 42% 15:00 total
58
+
59
+ #1 ███████████████ █████ ✓
60
+ #2 ██████▎········ ····· ◀ now
61
+ #3 ··············· ·····
62
+ work 15:00 break 5:00
63
+
64
+ [space] pause [s] skip [q] quit
65
+ ```
66
+
67
+ 作業は赤、休憩は緑で表示します。`NO_COLOR`に空でない値を設定すると色を付けません。
68
+ ターミナルの幅が狭い場合は、残り時間・割合・バーだけのコンパクト表示や1行表示に
69
+ 切り替え、起動時のロゴも短い見出しにします。
70
+
71
+ タイマー実行中は次のキーで操作できます。
72
+
73
+ | キー | 動作 |
74
+ | -------- | ------------------------------------------------------------------------------ |
75
+ | `space` | 一時停止 / 再開。一時停止中は時間が進みません |
76
+ | `s` | 現在のフェーズをskipして次へ進みます。音は鳴らさず、作業の完了数にも数えません |
77
+ | `q` | タイマーを止めて終了します(終了コード0) |
78
+ | `Ctrl+C` | タイマーを止めて終了します(終了コード130) |
79
+
80
+ 終了予定時刻を過ぎたフェーズでキーを押した場合は、先にそのフェーズを完了として扱ってから
81
+ 操作を適用します。`SIGTERM`(143)、`SIGHUP`(129)でも、非表示にしたカーソルと
82
+ キー入力の設定を元に戻してから終了します。
83
+ 標準入出力がターミナルでない場合(パイプやリダイレクト)は、キー操作を受け付けず、
84
+ フェーズの開始と完了を1行ずつ出力します。
85
+
43
86
  利用可能なオプションは、次のコマンドで確認できます。
44
87
 
45
88
  ```shell
@@ -49,5 +92,12 @@ pomotty --help
49
92
  作業と休憩の完了時には、それぞれ異なる通知音を再生します。macOSでは
50
93
  `afplay`、Linuxでは`paplay`または`aplay`、WindowsではPowerShellを利用し、
51
94
  再生できない環境では異なる回数のターミナルベルに切り替わります。
95
+ 再生コマンドは起動時に1回だけ絶対パスへ解決します。Linuxでは`PATH`のうち
96
+ 絶対パスのディレクトリだけを探索し、作業ディレクトリ配下と`node_modules/.bin`に
97
+ ある同名コマンドは使いません。
52
98
 
53
99
  開発手順とnpmへの公開・更新手順は[開発ガイド](./DEVELOPMENT.ja.md)を参照してください。
100
+
101
+ ## ライセンス
102
+
103
+ MIT
package/README.md CHANGED
@@ -40,6 +40,51 @@ pomotty --loop 5
40
40
  pomotty --work=25 --break=5 --loop=2
41
41
  ```
42
42
 
43
+ While the timer runs, the remaining time is shown in large digits and updated in
44
+ place. Below it are a progress bar for the current phase (elapsed time, percentage,
45
+ and total time) and a timeline showing the work and break progress of each cycle.
46
+
47
+ ```text
48
+ 🍅 WORK Cycle 2 / 3
49
+
50
+ ██████ ██ ██ ██████
51
+ ██ ██ ██ ██ ██ ██
52
+ ██████ ██████ ██████
53
+ ██ ██ ██ ██ ██
54
+ ██████ ██ ██████
55
+
56
+ ━━━━━━━━━━━━━━━━────────────────────────
57
+ 6:18 elapsed 42% 15:00 total
58
+
59
+ #1 ███████████████ █████ ✓
60
+ #2 ██████▎········ ····· ◀ now
61
+ #3 ··············· ·····
62
+ work 15:00 break 5:00
63
+
64
+ [space] pause [s] skip [q] quit
65
+ ```
66
+
67
+ Work is shown in red and breaks in green. Set `NO_COLOR` to a non-empty value to
68
+ disable colors. In narrow terminals, the timer switches to a compact view with only
69
+ the remaining time, percentage, and bar, or to a single line, and the startup logo
70
+ is replaced with a short title.
71
+
72
+ While the timer runs, you can use these keys:
73
+
74
+ | Key | Action |
75
+ | -------- | ------------------------------------------------------------------------------------ |
76
+ | `space` | Pause or resume. Time does not pass while paused |
77
+ | `s` | Skip the current phase. No sound plays, and skipped work is not counted as completed |
78
+ | `q` | Stop the timer and exit (exit code 0) |
79
+ | `Ctrl+C` | Stop the timer and exit (exit code 130) |
80
+
81
+ If the current phase has already reached its end time when you press a key, the
82
+ phase is completed first and the key then applies to the next phase. On `SIGTERM`
83
+ (143) or `SIGHUP` (129), the timer also restores the hidden cursor and the terminal
84
+ input mode before exiting. When standard input or output is not a terminal (for
85
+ example, a pipe or redirect), keys are not read and the timer prints one line when
86
+ each phase starts and finishes.
87
+
43
88
  To see the available options, run:
44
89
 
45
90
  ```shell
@@ -50,6 +95,9 @@ Different notification sounds play when work and break sessions end. Sound
50
95
  playback uses `afplay` on macOS, `paplay` or `aplay` on Linux, and PowerShell on
51
96
  Windows. If audio playback is unavailable, the timer falls back to different
52
97
  numbers of terminal bells for work and break notifications.
98
+ Playback commands are resolved to absolute paths once at startup. On Linux, only
99
+ absolute directories in `PATH` are searched, and commands under the working
100
+ directory or `node_modules/.bin` are never used.
53
101
 
54
102
  For development and npm publishing instructions, see the [development guide](./DEVELOPMENT.md).
55
103