Compare commits
30 Commits
V2
...
a2299e9c70
| Author | SHA1 | Date | |
|---|---|---|---|
| a2299e9c70 | |||
| 8814740b6f | |||
| 5aaf543ad3 | |||
| 7daeac02f2 | |||
| 267373b209 | |||
| ec3efed2df | |||
| a50fbf8e03 | |||
| 93d9959bac | |||
| 507ca63f0e | |||
| 7abf5bc721 | |||
| 5d8f01d8e3 | |||
| 555a86dc27 | |||
| f1a532f75d | |||
| fbf69fdcd3 | |||
| 58bd538092 | |||
| 33c8eb68f0 | |||
| c5d7d3f16d | |||
| d9255dc165 | |||
| 12385f639a | |||
| 953a115598 | |||
| 37637d11e7 | |||
| 1fd4a10a5c | |||
| 80e3bf39be | |||
| 9a1b1de529 | |||
| ec7c4dd295 | |||
| 34edd44cd7 | |||
| 8317260816 | |||
| a214e5e908 | |||
| aca0a37746 | |||
| f207aa6133 |
32
install.sh
Executable file
32
install.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# /opt/homebrew/etc/bash_completion.d/soco-cli-gui-completion.bash
|
||||
|
||||
|
||||
italic="\033[3m"
|
||||
underline="\033[4m"
|
||||
bold="\033[1m"
|
||||
reset="\033[0m"
|
||||
|
||||
SCRIPT_PATH=$(pwd)
|
||||
completion_path="/opt/homebrew/etc/bash_completion.d"
|
||||
|
||||
# Make soco-cli-gui accessible in PATH
|
||||
|
||||
if [ -d $HOME/.local/bin ]; then
|
||||
dest="$HOME/.local/bin"
|
||||
ln -fs "${SCRIPT_PATH}"/soco-cli-gui.sh $dest/soco-cli-gui
|
||||
|
||||
else
|
||||
dest="/usr/local/bin"
|
||||
sudo ln -fs "${SCRIPT_PATH}"/soco-cli-gui.sh $dest/soco-cli-gui
|
||||
fi
|
||||
|
||||
echo -e "Installing ${bold}soco-cli-gui${reset} in ${bold}$dest${reset} ..."
|
||||
|
||||
|
||||
# Install completions
|
||||
|
||||
ln -fs "${SCRIPT_PATH}"/soco-cli-gui-completion.bash $completion_path/soco-cli-gui-completion.bash
|
||||
|
||||
echo -e "\n${bold}soco-cli-gui${reset} has been installed. Run ${bold}soco-cli-gui${reset} command!"
|
||||
14
soco-cli-gui-completion.bash
Normal file
14
soco-cli-gui-completion.bash
Normal file
@@ -0,0 +1,14 @@
|
||||
#/usr/bin/env bash
|
||||
|
||||
# https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial#registering-the-completion-script
|
||||
|
||||
_soco-cli-gui_completions()
|
||||
{
|
||||
COMPREPLY=($(compgen -W "deezer_flow franceinfo franceinter k6fm rires rtl level_11 level_13 level_15 vol+ vol- mute_off mute_on pause next prev start stop alarms inform sysinfo play_local_file play_local_dir list_favs clear_queue list_queue alarms create_alarms move_alarms remove_alarms enable_alarms modify_alarms snooze_alarms" "${COMP_WORDS[1]}"))
|
||||
|
||||
}
|
||||
|
||||
complete -F _soco-cli-gui_completions soco-cli-gui
|
||||
|
||||
|
||||
#complete -W "deezer_flow franceinfo franceinfo k6fm rires rtl level_11 level_13 level_15 vol+ vol- mute_off mute_on pause next prev start stop alarms inform sysinfo" soco-cli-gui.sh
|
||||
2394
soco-cli-gui.sh
2394
soco-cli-gui.sh
File diff suppressed because it is too large
Load Diff
BIN
soco-cli-logo-01-large.png
Normal file
BIN
soco-cli-logo-01-large.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Reference in New Issue
Block a user