aboutsummaryrefslogtreecommitdiffstats
path: root/copy-menu-issue.txt
blob: 946720400cf7969a902ddf22bc50775da26f8e00 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Summary: copy.sh menu issues on Debian host

Symptoms
- Running copy.sh shows a black screen with a cursor; no visible menu.
- Running scripts/tui_menu.py directly renders an ncurses menu, but Express appears disabled.
- The host has ~/.config/hypr/v2.3.18 present.

Changes already made (in repo)
- Added Python TUI (scripts/tui_menu.py) with backends: Textual -> curses -> basic; mouse + keyboard; hotkeys; Help panel.
- Updated scripts/copy_menu.sh to prefer Python TUI and to accept COPY_TUI_BACKEND=auto|textual|curses|basic, passing --express-supported accordingly.
- Hardened curses drawing to avoid blank screens (use_default_colors, safer bounds).
- Fixed Express detection in copy.sh to pick the highest version marker (sort -V) under ~/.config/hypr (vX.Y.Z).

Why Express shows disabled when running the TUI directly
- scripts/tui_menu.py defaults to --express-supported=0 unless told otherwise. When launched by copy.sh, it is passed the correct flag. Running it manually without the flag will show Express as disabled.

Immediate workaround on the Debian host
1) Ensure you have the latest repo changes
   git --no-pager status
   git pull --ff-only

2) Force the curses backend to avoid the black Textual screen
   # one-shot
   COPY_TUI_BACKEND=curses ./copy.sh
   # or set permanently for the session
   export COPY_TUI_BACKEND=curses
   ./copy.sh

3) If curses ever fails to render, use the basic fallback
   COPY_TUI_BACKEND=basic ./copy.sh

4) To test the TUI directly with Express allowed
   python3 scripts/tui_menu.py --express-supported 1 --backend curses

Verify Express detection on the host
- Confirm the installed version marker and what copy.sh will see:
  find "$HOME/.config/hypr" -maxdepth 1 -type f -name 'v*.*.*' -printf '%f\n' | sed 's/^v//' | sort -V | tail -n1
- Expected output: 2.3.18 (or newer). If empty, create the marker:
  : > "$HOME/.config/hypr/v2.3.18"

If black screen persists with copy.sh
- Dump debug logs for the menu selection phase:
  set -x; COPY_TUI_BACKEND=curses bash -c 'source scripts/copy_menu.sh; show_copy_menu 1; echo "CHOICE=$COPY_MENU_CHOICE"'; set +x
- Check TERM and Python TUI dependency situations:
  echo "$TERM"
  command -v python3 || true
  python3 -c "import curses; print('curses OK')" || true

Notes for future session
- copy_menu.sh already honors COPY_TUI_BACKEND and falls back to whiptail/text if Python fails.
- copy.sh now uses highest version marker to enable Express; the marker must be a file named exactly vX.Y.Z under ~/.config/hypr.
- If this host lacks Textual (rich) and shows black screen in Textual, forcing curses via COPY_TUI_BACKEND=curses is the recommended run mode on Debian for now.
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage