2

Was just finishing some script containing a choice menu and was wondering if there's a tool out there that could be called by a script, provides a 1-click-choice-menu and returns the result back to the script.

Impossible that such doesn't exist, but... ever tried to google "bash menu click/mouse/gui/whatever"?

3

There are a number of tools for adding GUI interaction to your shell scripts, including:

And there are undoubtedly others.

  • awsome, you're my hero of the day. Thank you =) – muab Aug 15 '15 at 13:01
  • @muab: Do not forget to mark the answer that helped you as "correct". It helps to track down answered questions. – perror Aug 15 '15 at 16:39
  • The "original" would probably be ipick. – Thomas Dickey Dec 31 '16 at 23:26
3

I would use zenity with command substitution mechanism:

$ shell=$(zenity --list --text "What's your favorite shell?" --title "My title" --column="shells" "bash" "csh" "ksh" "zsh")
$ echo "$shell"
zsh
  • great, exactly(!) the dialog I needed ^^ (except for the strings of course ,p). Thx – muab Aug 15 '15 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.