Skip to content

Commit 44907ed

Browse files
committed
q bind conflicts in wordle so removed it as a global esc to menu its just esc now, also debugging installation issuse
1 parent 914b869 commit 44907ed

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Zig build artifacts
22
.zig-cache/
33
zig-out/
4+
.tmp-install/
5+
.zig-global-cache/
46

57
# macOS
68
.DS_Store

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Not affiliated with The New York Times.
1818
This project publishes a self-contained Homebrew formula as a release asset.
1919

2020
```bash
21-
brew install --formula https://github.com/ph8n/nytgames-cli/releases/download/vX.Y.Z/nytgames-cli.rb
21+
brew install --formula https://github.com/ph8n/nytgames-cli/releases/latest/download/nytgames-cli.rb
2222
```
2323

2424
### Curl (macOS + Linux)

scripts/build-deb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ Homepage: ${HOMEPAGE}
9595
Description: ${DESCRIPTION}
9696
EOF
9797

98-
dpkg-deb --build "${tmp}/pkg" "${OUT_FILE}" >/dev/null
98+
# Use xz (widely supported) and force root:root ownership for packaged files.
99+
dpkg-deb --build --root-owner-group -Zxz "${tmp}/pkg" "${OUT_FILE}" >/dev/null
99100
echo "Wrote ${OUT_FILE}"
100-

src/games/connections/connections.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fn handleKey(
205205
db: *sqlite.Db,
206206
) !void {
207207
if (ui_keys.isCtrlC(k)) return InputExit.Quit;
208-
if (k.matches(vaxis.Key.escape, .{}) or k.matches('q', .{})) return InputExit.BackToMenu;
208+
if (k.matches(vaxis.Key.escape, .{})) return InputExit.BackToMenu;
209209

210210
if (state.phase == .finished) {
211211
if (isEnterKey(k) or k.matches(' ', .{})) return InputExit.BackToMenu;
@@ -695,7 +695,7 @@ fn render(vx: *vaxis.Vaxis, state: *GameState, direct_launch: bool) !void {
695695
printCentered(
696696
win,
697697
layout.header_y + 1,
698-
"Space: select Enter: submit s: shuffle d: deselect q/Esc: menu Ctrl+C: quit",
698+
"Space: select Enter: submit s: shuffle d: deselect Esc: menu Ctrl+C: quit",
699699
.{ .fg = colors.ui.text_dim },
700700
);
701701

src/games/wordle/wordle.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub fn run(
9595
.mouse, .mouse_leave => {},
9696
.key_press => |k| {
9797
if (ui_keys.isCtrlC(k)) return .quit;
98-
if (k.matches(vaxis.Key.escape, .{}) or k.matches('q', .{})) return .back_to_menu;
98+
if (k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
9999

100100
if (state.phase == .finished) {
101101
if (isEnterKey(k) or k.matches(' ', .{})) {
@@ -394,8 +394,8 @@ fn render(vx: *vaxis.Vaxis, state: *GameState, msg: *StatusMessage, direct_launc
394394

395395
_ = direct_launch;
396396
const title = switch (mode) {
397-
.daily => "Wordle (q/Esc: menu Ctrl+C: quit)",
398-
.unlimited => "Wordle Unlimited (q/Esc: menu Ctrl+C: quit)",
397+
.daily => "Wordle (Esc: menu Ctrl+C: quit)",
398+
.unlimited => "Wordle Unlimited (Esc: menu Ctrl+C: quit)",
399399
};
400400

401401
const tile_w: u16 = 5;

src/ui/already_played.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub fn run(
3434
win.clear();
3535
win.hideCursor();
3636

37-
const hint = "q/Esc: back Enter/Space: ok Ctrl+C: quit";
37+
const hint = "Esc: back Enter/Space: ok Ctrl+C: quit";
3838

3939
const body_h: u16 = if (options.mark == null) 3 else 4;
4040
const block_h: u16 = 2 + 1 + body_h; // title + hint + gap + body
@@ -64,7 +64,7 @@ pub fn run(
6464
.mouse, .mouse_leave => {},
6565
.key_press => |k| {
6666
if (keys.isCtrlC(k)) return .quit;
67-
if (k.matches('q', .{}) or k.matches(vaxis.Key.escape, .{}) or isEnterKey(k) or isSpaceKey(k)) {
67+
if (k.matches(vaxis.Key.escape, .{}) or isEnterKey(k) or isSpaceKey(k)) {
6868
return if (options.direct_launch) .quit else .back_to_menu;
6969
}
7070
},

src/ui/stats.zig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn runWordle(
202202
win.hideCursor();
203203

204204
const title = "Stats";
205-
const subtitle = "h/l or ←/→: month q/Esc: back Ctrl+C: quit";
205+
const subtitle = "h/l or ←/→: month Esc: back Ctrl+C: quit";
206206
printCentered(win, 0, title, .{ .bold = true });
207207
printCentered(win, 1, subtitle, .{ .fg = colors.ui.text_dim });
208208

@@ -214,7 +214,7 @@ fn runWordle(
214214
.winsize => |ws| try vx.resize(allocator, tty.writer(), ws),
215215
.key_press => |k| {
216216
if (keys.isCtrlC(k)) return .quit;
217-
if (k.matches('q', .{}) or k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
217+
if (k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
218218

219219
if (k.matches(vaxis.Key.left, .{}) or k.matches('h', .{})) {
220220
if (first_played) |fp| {
@@ -269,7 +269,7 @@ fn runConnections(
269269
win.hideCursor();
270270

271271
const title = "Stats";
272-
const subtitle = "h/l or ←/→: month q/Esc: back Ctrl+C: quit";
272+
const subtitle = "h/l or ←/→: month Esc: back Ctrl+C: quit";
273273
printCentered(win, 0, title, .{ .bold = true });
274274
printCentered(win, 1, subtitle, .{ .fg = colors.ui.text_dim });
275275

@@ -281,7 +281,7 @@ fn runConnections(
281281
.winsize => |ws| try vx.resize(allocator, tty.writer(), ws),
282282
.key_press => |k| {
283283
if (keys.isCtrlC(k)) return .quit;
284-
if (k.matches('q', .{}) or k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
284+
if (k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
285285

286286
if (k.matches(vaxis.Key.left, .{}) or k.matches('h', .{})) {
287287
if (first_played) |fp| {
@@ -325,7 +325,7 @@ fn runWordleUnlimited(
325325
win.hideCursor();
326326

327327
const title = "Stats";
328-
const subtitle = "q/Esc: back Ctrl+C: quit";
328+
const subtitle = "Esc: back Ctrl+C: quit";
329329
printCentered(win, 0, title, .{ .bold = true });
330330
printCentered(win, 1, subtitle, .{ .fg = colors.ui.text_dim });
331331

@@ -337,7 +337,7 @@ fn runWordleUnlimited(
337337
.winsize => |ws| try vx.resize(allocator, tty.writer(), ws),
338338
.key_press => |k| {
339339
if (keys.isCtrlC(k)) return .quit;
340-
if (k.matches('q', .{}) or k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
340+
if (k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
341341
},
342342
.mouse, .mouse_leave => {},
343343
}
@@ -629,7 +629,7 @@ fn runStub(
629629
win.hideCursor();
630630

631631
const title = "Stats";
632-
const subtitle = "q/Esc: back Ctrl+C: quit";
632+
const subtitle = "Esc: back Ctrl+C: quit";
633633
printCentered(win, 0, title, .{ .bold = true });
634634
printCentered(win, 1, subtitle, .{ .fg = colors.ui.text_dim });
635635

@@ -651,7 +651,7 @@ fn runStub(
651651
.winsize => |ws| try vx.resize(allocator, tty.writer(), ws),
652652
.key_press => |k| {
653653
if (keys.isCtrlC(k)) return .quit;
654-
if (k.matches('q', .{}) or k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
654+
if (k.matches(vaxis.Key.escape, .{})) return .back_to_menu;
655655
},
656656
.mouse, .mouse_leave => {},
657657
}

0 commit comments

Comments
 (0)