@timmy6942025/cli-timer 1.1.7 → 1.1.8
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.md +5 -5
- package/package.json +1 -1
- package/src/index.js +11 -11
package/README.md
CHANGED
|
@@ -55,16 +55,18 @@ By default, timer and stopwatch output is centered in the terminal.
|
|
|
55
55
|
|
|
56
56
|
You can view and set the ASCII font style used for the timer and stopwatch display.
|
|
57
57
|
|
|
58
|
-
To list
|
|
58
|
+
To list all available fonts:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
61
|
timer style
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
This is instant and lists all figlet fonts.
|
|
65
|
+
|
|
66
|
+
To list only timer-compatible fonts (fonts that render `01:23:45` visibly):
|
|
65
67
|
|
|
66
68
|
```bash
|
|
67
|
-
timer style --
|
|
69
|
+
timer style --compatible
|
|
68
70
|
```
|
|
69
71
|
|
|
70
72
|
To set your preferred font:
|
|
@@ -105,8 +107,6 @@ This launches a Bubble Tea based screen where you can change:
|
|
|
105
107
|
- Restart key
|
|
106
108
|
- Exit key / exit alt key
|
|
107
109
|
|
|
108
|
-
The settings UI font picker now shows timer-compatible fonts only.
|
|
109
|
-
|
|
110
110
|
Controls in settings UI:
|
|
111
111
|
|
|
112
112
|
- `Enter`: select/toggle
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -978,7 +978,7 @@ function runSettingsUI() {
|
|
|
978
978
|
const state = {
|
|
979
979
|
configPath: CONFIG_PATH,
|
|
980
980
|
config: readConfig(),
|
|
981
|
-
fonts:
|
|
981
|
+
fonts: getAllFonts()
|
|
982
982
|
};
|
|
983
983
|
|
|
984
984
|
fs.writeFileSync(SETTINGS_STATE_PATH, JSON.stringify(state), "utf8");
|
|
@@ -1046,6 +1046,7 @@ function printUsage() {
|
|
|
1046
1046
|
process.stdout.write("Font Styles\n");
|
|
1047
1047
|
process.stdout.write(" timer style\n");
|
|
1048
1048
|
process.stdout.write(" timer style --all\n");
|
|
1049
|
+
process.stdout.write(" timer style --compatible\n");
|
|
1049
1050
|
process.stdout.write(" timer style <font>\n");
|
|
1050
1051
|
}
|
|
1051
1052
|
|
|
@@ -1067,29 +1068,28 @@ function runTimer(args) {
|
|
|
1067
1068
|
}
|
|
1068
1069
|
|
|
1069
1070
|
if (args[0] === "style") {
|
|
1070
|
-
if (args.length === 1 || (args.length === 2 && args[1] === "--
|
|
1071
|
-
process.stdout.write("Checking font compatibility for timer digits...\n\n");
|
|
1071
|
+
if (args.length === 1 || (args.length === 2 && args[1] === "--all")) {
|
|
1072
1072
|
const currentFont = getFontFromConfig();
|
|
1073
|
-
const fonts =
|
|
1073
|
+
const fonts = getAllFonts();
|
|
1074
1074
|
process.stdout.write(`Current font: ${currentFont}\n\n`);
|
|
1075
|
-
process.stdout.write("
|
|
1075
|
+
process.stdout.write("Available fonts:\n");
|
|
1076
1076
|
for (const font of fonts) {
|
|
1077
1077
|
process.stdout.write(`${font}\n`);
|
|
1078
1078
|
}
|
|
1079
|
-
process.stdout.write("\
|
|
1079
|
+
process.stdout.write("\nTip: Some fonts do not support timer digits.\n");
|
|
1080
|
+
process.stdout.write("Use `timer style <font>` to validate and set safely.\n");
|
|
1080
1081
|
return;
|
|
1081
1082
|
}
|
|
1082
1083
|
|
|
1083
|
-
if (args.length === 2 && args[1] === "--
|
|
1084
|
+
if (args.length === 2 && args[1] === "--compatible") {
|
|
1085
|
+
process.stdout.write("Checking font compatibility for timer digits...\n\n");
|
|
1084
1086
|
const currentFont = getFontFromConfig();
|
|
1085
|
-
const fonts =
|
|
1087
|
+
const fonts = getTimerCompatibleFontsSlow();
|
|
1086
1088
|
process.stdout.write(`Current font: ${currentFont}\n\n`);
|
|
1087
|
-
process.stdout.write("
|
|
1089
|
+
process.stdout.write("Timer-compatible fonts:\n");
|
|
1088
1090
|
for (const font of fonts) {
|
|
1089
1091
|
process.stdout.write(`${font}\n`);
|
|
1090
1092
|
}
|
|
1091
|
-
process.stdout.write("\nSome fonts do not support timer digits.\n");
|
|
1092
|
-
process.stdout.write("Use `timer style` for a safe compatible list.\n");
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
1095
|
|