-
Notifications
You must be signed in to change notification settings - Fork 50
Pop up UI Accessory Views
Whitebox

To display a whitebox style pop-up pass -accessory_view_type whitebox
parameter.
Whitebox has a mandatory -accessory_view_payload
parameter as quoted text which will be displayed inside the whitebox.
Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type whitebox -accessory_view_payload "Test accessory view" -main_button_label "OK"
Whitebox also supports a Markdown styled text as a payload, it will render all supported Markdown flavors.

Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type whitebox -accessory_view_payload "## This is markdown\n **It's cool**\n _It supports all major flavors_" -main_button_label "OK"
Timer

To display a timer style pop-up pass -accessory_view_type timer
parameter.
Timer has a mandatory -accessory_view_payload
parameter as quoted text which determines the label for the timer accessory view and a mandatory -timeout
parameter as integer value to define the number of seconds until timeout is called by the pop-up.
To define the timer position inside the label use %@
.
Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type timer -accessory_view_payload "Time left: %@" -timeout 300 -main_button_label "OK"
Image

To display an image style pop-up pass -accessory_view_type image
parameter.
Image has a mandatory -accessory_view_payload
parameter, which is URL of the image or absolute path to the image as quoted text.
If image path or URL does not exist, error message is printed.
Error message when image does not exist:
Error while trying to load image at https://atlascorps.org/wp-content/2018/03/IBM-Logo.png, error: (null)
Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type image -accessory_view_payload "https://atlascorps.org/wp-content/uploads/2018/03/IBM-Logo.png" -main_button_label "OK"
Video

To display a video style pop-up pass -accessory_view_type video
parameter.
Video has a mandatory -accessory_view_payload
parameter as direct URL of the video or absolute path to the video file as quoted text. If video path or URL does not exist or is incorrect, error message is printed.
Error message when video is incorrect:
Unable to load video from https://www.youtube.com/watch\?v\=r7E1TJ1HtM0
Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type video -accessory_view_payload "/Users/johny/Documents/video.mov" -main_button_label "OK"
Input

To display an input style pop-up pass -accessory_view_type input
parameter.
Input has a mandatory -accessory_view_payload
parameter as quoted text, which will show as a placeholder for input field.
Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type input -accessory_view_payload "Enter your name" -main_button_label "OK"
Secured input

To display a secured input style pop-up pass -accessory_view_type securedInput
parameter.
Secured input has a mandatory -accessory_view_payload
parameter as quoted text, which will show as a placeholder for secured input field.
Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type securedInput -accessory_view_payload "Enter password" -main_button_label "OK"
Progress bar

To display a progress bar style pop-up pass -accessory_view_type progressbar
parameter.
Progress bar has a mandatory -accessory_view_payload
parameter as quoted text, which will control behaviour and looks of the progress bar.
Payload parameter must contain at least /percent 0
string, which will determine initial progress shown.
It can also contain following optional control strings:
/top_message Some message
which will be shown in the dialog just above the progress bar itself;
/bottom_message Some message
which will be shown in the dialog just below the progress bar itself;
/user_interruption_allowed true
which will display a Cancel button during the progress;
/user_interaction_enabled true
which will display all the defined buttons for the pop-up even if the progress bar has not finished yet.
To control progress on the progress bar you can pass /percent number
, which can be anything between 0 and 100 at which point the progress is finished and all the buttons passed at the beginning will be shown. You can also dynamically update /top_message
and /bottom_message
values.
The progress bar could also show an indeterminate behaviour, to do so use /percent indeterminate
.
PN: you can pass from an indeterminate behaviour to a determinate one defining a different /percent
but not the other way around.

Example command:
./"Mac@IBM Notifications" -type popup -title "Test title" -subtitle "Test subtitle" -accessory_view_type progressbar -accessory_view_payload "/percent 25 /top_message ProgressBar top message /bottom_message Progress" -main_button_label "OK"
-
Deprecated documentation