This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/BelkaDev/mustream | |
# Requires a running Spotify desktop client | |
check::network() { | |
[[ $? != 0 ]] && echo "Network error: couldn't reach server." && exit 1 | |
} | |
check::running() { | |
[[ -z $(pidof -s spotify) ]] && echo "Spotify is not running." && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off &title Multiple GUI choices via powershell snippet by AveYo &rem preview: https://i.imgur.com/JjazNR0.png | |
:: setup gui dialog choices | |
set all_choices=Option 1,Option 2,Option 3,Option4,Option5 | |
set def_choices=Option 1,Option 2,Option5 | |
:: Show gui dialog choices 1=title 2=all_choices 3=def_choices 4=output_variable | |
call :choices "Multiple GUI choices" "%all_choices%" "%def_choices%" CHOICES | |
:: Quit if no choice selected | |
if not defined CHOICES color 0c &echo ERROR! No choice selected.. &timeout /t 20 &color 07 &exit/b | |
:: Print choices | |
echo Choices: %CHOICES% & echo. |