Skip to content

Instantly share code, notes, and snippets.

View made-indrayana's full-sized avatar
:octocat:
curious

Made Indrayana made-indrayana

:octocat:
curious
View GitHub Profile
@made-indrayana
made-indrayana / multiple_gui_choices.bat
Created August 22, 2023 22:08 — forked from AveYo/multiple_gui_choices.bat
Simple GUI helpers for batch files
@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.
@made-indrayana
made-indrayana / mustream
Last active July 12, 2022 07:02 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line. Included mustream to do spotify search, revising the outdated cUrl search from the original sp code.
#!/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