Commit Graph

3 Commits (c1d5c7d9cbf03d8c5d544267a20c05aaae97fcd4)

Author SHA1 Message Date
Amir Alexander Abdelbaki e295910234 add photobooth.py: curses TUI rewrite of the live preview loop
Replaces per-frame fswebcam process spawns with a persistent OpenCV/v4l2
capture handle for the highest achievable refresh rate, while still
shelling out to ascii-image-converter for conversion and txt2printr.sh
for printing. Renders a bordered live preview with a status/keybind-help
bar via curses, works on a plain TTY with no graphical environment.

Reuses webcam.conf/ascii.conf/keybinds.conf, parsed as plain key=value
(not sourced, so a config file can no longer execute arbitrary code).
Brightness/exposure now go through v4l2-ctl with percentage mapped onto
each control's actual min/max range; added DEVICE/BRIGHTNESS_CTRL_ID/
EXPOSURE_CTRL_ID to webcam.conf and KEY_QUIT to keybinds.conf for this,
kept separate from the bash-oriented keys so the existing bash scripts
are unaffected. Bash scripts are left in place as a fallback.

New deps: python-opencv, v4l-utils.
2026-07-03 13:07:53 +02:00
Amir Alexander Abdelbaki 1d77f411fa rebind capture to the space bar
space is easier to hit than c mid-pose for a photobooth; the hint bar
now renders "space" instead of a literal blank so the UI stays legible.
2026-07-03 11:52:57 +02:00
Amir Alexander Abdelbaki 7f67c5fd81 add ascii.conf and keybinds.conf for converter options and rebindable keys
ascii.conf exposes ascii-image-converter's dimension/complexity/map/
grayscale/negative/flip options (color and braille stay out since they
rely on ANSI/multi-byte Unicode that txt2printr.sh's raw print path
can't render). keybinds.conf lets exec-cycle.sh's capture/brightness/
exposure/reset keys be rebound instead of hardcoded, matched
case-insensitively; the on-screen hint bar renders from the same
config so it never drifts out of sync with the actual bindings.
2026-07-03 11:33:33 +02:00