Giter VIP home page Giter VIP logo

hdialog's Introduction

hdialog

Xdialog clone for Haiku

This tool can be used to display GUI dialogs from shell scripts.

Installation

$ git clone [email protected]:atalax/hdialog.git
$ cd hdialog
$ make OBJ_DIR=objects
$ cp objects/hdialog ~/config/non-packaged/bin/

Usage

Usage:
    hdialog <type> [arguments]...
Display a GUI dialog.

      --help       display this help
  -w, --width      width of the dialog
  -h, --height     height of the dialog
  -t, --title      title of the window
  -m, --modal      set the type of the window to modal

Dialog types:
  --info text...
  --input text...
  --status text...
  --radio text opt1 opt2 opt3...
  --checkbox text opt1 opt2 opt3...
  --status text...
  --color text...

GitHub: https://github.com/atalax/hdialog

Examples

You can create standard alert-like dialogs:

$ hdialog -m --info "Finished downloading all files."

simple-info

$ hdialog -m --yesno "Do you really want to delete ~ ?"

yesno

Ask for textual input:

$ hdialog -m --input "Hello, what's yout name? :)"

name-input

You can also do selections from multiple items:

$ hdialog -m --radio "Which is your favourite color?" Red Yellow Green Orange Blue

radio-colors

Or pick color:

$ hdialog -m --color Choose the color of your pony:

hdialog-color

You can remove the -m switch and get the standard non-modal window look:

$ hdialog --title Animals --checkbox "Which of the following are animals?" House Cow Dog Pencil Cat

checkbox

The results are then returned using the standard output.

For displaying progress, --status can be used:

$ hdialog -m -h 70 -w 300 --status Downloading...

status

You can control the status bar by piping percentages to stdin and terminate it by quit like this:

$ (for x in $(seq 0 100); do echo $x; sleep 0.1; done; echo quit) | hdialog --status Counting...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.