Use the --scale option.

# Scale Dialog

Use the --scale option to create a scale dialog.

The scale dialog supports the following options:

# --text=TEXT

Set the dialog text. (Default: Adjust the scale value)

# --value=VALUE

Set initial value. (Default: 0) You must specify value between minimum value to maximum value.

# --min-value=VALUE

Set minimum value. (Default: 0)

# --max-value=VALUE

Set maximum value. (Default: 100)

# --step=VALUE

Set step size. (Default: 1)

# --print-partial

Print value to standard output, whenever a value is changed.

# --hide-value

Hide value on dialog.

The following example script shows how to create a scale dialog:

#!/bin/sh

VALUE=`zenity --scale --text="Select window transparency." --value=50`

case $? in 0) echo "You selected $VALUE%.";; 1) echo "No value selected.";; -1) echo "An unexpected error has occurred.";; esac

# Scale Dialog Example

Zenity
scale dialog example