2022-05-03 22:09:25 +01:00
|
|
|
# kdialog
|
|
|
|
|
|
|
|
> Show KDE dialog boxes from within shell scripts.
|
|
|
|
> More information: <https://develop.kde.org/deploy/kdialog/>.
|
|
|
|
|
|
|
|
- Open a dialog box displaying a specific message:
|
|
|
|
|
|
|
|
`kdialog --msgbox "{{message}}" "{{optional_detailed_message}}"`
|
|
|
|
|
|
|
|
- Open a question dialog with a `yes` and `no` button, returning `0` and `1`, respectively:
|
|
|
|
|
|
|
|
`kdialog --yesno "{{message}}"`
|
|
|
|
|
|
|
|
- Open a warning dialog with a `yes`, `no`, and `cancel` button, returning `0`, `1`, or `2` respectively:
|
|
|
|
|
|
|
|
`kdialog --warningyesnocancel "{{message}}"`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Open an input dialog box and print the input to `stdout` when `OK` is pressed:
|
2022-05-03 22:09:25 +01:00
|
|
|
|
|
|
|
`kdialog --inputbox "{{message}}" "{{optional_default_text}}"`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Open a dialog to prompt for a specific password and print it to `stdout`:
|
2022-05-03 22:09:25 +01:00
|
|
|
|
|
|
|
`kdialog --password "{{message}}"`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Open a dialog containing a specific dropdown menu and print the selected item to `stdout`:
|
2022-05-03 22:09:25 +01:00
|
|
|
|
|
|
|
`kdialog --combobx "{{message}}" "{{item1}}" "{{item2}}" "{{...}}"`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Open a file chooser dialog and print the selected file's path to `stdout`:
|
2022-05-03 22:09:25 +01:00
|
|
|
|
|
|
|
`kdialog --getopenfilename`
|
|
|
|
|
2024-03-14 05:01:06 +00:00
|
|
|
- Open a progressbar dialog and print a D-Bus reference for communication to `stdout`:
|
2022-05-03 22:09:25 +01:00
|
|
|
|
|
|
|
`kdialog --progressbar "{{message}}"`
|