Hacker News new | ask | show | jobs
by mrlemke 1557 days ago
TUIs are better for visual representation and interaction on resource constrained systems. Just keep using the CLI if that's what you want.

I'm not sure why you need HTTP or dbus for control. Just use stdin and stdout. For example:

  cat << EOF | my-cli-music-player
  enqueue album:40-oz-to-freedom
  enqueue album:steal-your-face
  randomize
  play 10
  wait 20s
  ...
  EOF
This works with other CLI programs. For example (make sure you have dc and espeak):

  cat << EOF | dc | espeak
  100 k 22 7 / p
  EOF
1 comments

I need to validate but I expect many of these tools will not handle piped input properly, use event loops or otger tools that expect keyboard input as events not just streams. Other prosaic applicationisms abound- How does one send cursor up, or F10 to get into a memu, to an app via stdin? The paradigm falls appart, & TUI's as distonctly different elements than regular cli tools rears it's ugly head.

Tools like espeak and dc that you cite fall into the conventional cli-tools camp. By compare mamy of the TUI tools we see here have their own autocomplete systems embedded in the program, multiple screens, full terminal layouts, multiple on-screen focus-able areas.