# Shell

# Notifications / list chooser

## GUI

<p class="callout warning">Not possible in Linux headless installation.  
</p>

#### Notification

```shell
zenity --notification \
	   --window-icon="info" \
	   --text="Blub Blub"
```

#### List selection

```shell
zenity --list --radiolist --height=275 --width=400 \
	--title="HP OMEN Profile selection" \
  	--column="" 	--column="Profile" --column="Description"\
    FALSE "cool" "Cool Power Profile" \
	TRUE "balanced" "Balanced Power Profile" \
	FALSE "performance" "Performance Power Profile" 
```

<p class="callout info">To get the result of this selection just do it like this: `VARNAME=<span class="pl-s"><span class="pl-pds">$(</span>zenity --list --radiolist --height=275 --width=400 --title=<span class="pl-pds">"</span>HP OMEN Profile selection<span class="pl-pds">"</span> --column=<span class="pl-pds">"</span><span class="pl-pds">"</span> --column=<span class="pl-pds">"</span>Profile<span class="pl-pds">"</span> --column=<span class="pl-pds">"</span>Description<span class="pl-pds">" FALSE "cool" "Cool Power Profile" FALSE "cool" "Cool Power Profile" TRUE "balanced" "Balanced Power Profile" FALSE "performance" "Performance Power Profile" )</span></span>```</p>

## Headless

#### Notification

```shell
whiptail --title "Title Blub" --msgbox "Text blub blub blub" 8 78
```

#### List selection

```bash
whiptail --title "Title Blub" --fb --menu "Select option" 11 50 3 \
	"option1" "Option text 1" \
	"option2" "Option text 2" \
	"option3" "Option text 3" 
```

<p class="callout info">To get the result of any of these just start do it like this `<span class="pl-s">VARNAME=$(whiptail --title <span class="pl-pds">"</span>HP OMEN Profile selection<span class="pl-pds">"</span> --fb --menu <span class="pl-pds">"</span>Select option<span class="pl-pds">"</span> 11 50 <span class="pl-pds">"</span>cool<span class="pl-pds">"</span> <span class="pl-pds">"</span>Cool Power Profile<span class="pl-pds">""balanced" "Balanced Power Profile" "performance" "Performance Power Profile" <span class="pl-k">3>&1</span> <span class="pl-k">1>&2</span> <span class="pl-k">2>&3</span>)</span></span>`</p>