2024-01-05 12:30:05 +01:00
|
|
|
########################################################################
|
|
|
|
# AMUSED
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
alias amused-next="_amused_cmd next"
|
|
|
|
alias amused-prev="_amused_cmd prev"
|
|
|
|
alias amused-play="_amused_cmd play"
|
|
|
|
alias amused-stop="_amused_cmd stop"
|
2024-01-08 23:06:28 +01:00
|
|
|
alias amused+="_amused_cmd seek +15"
|
|
|
|
alias amused-="_amused_cmd seek -15"
|
2024-01-05 12:30:05 +01:00
|
|
|
alias amused-jump="_amused_jump"
|
2024-01-08 23:06:28 +01:00
|
|
|
alias amused-shuffle="amused show | sort -R | amused load"
|
|
|
|
alias amused-sort="amused show | sort -h | amused load"
|
2024-01-05 12:30:05 +01:00
|
|
|
|
|
|
|
_amused_cmd() {
|
|
|
|
. ~/.bin/_config
|
2024-01-08 23:06:28 +01:00
|
|
|
amused "${@}" 2>&1 > /dev/null
|
2024-01-05 12:30:05 +01:00
|
|
|
STATUS="$(amused status | head -1 | cut -d'/' -f5-)"
|
|
|
|
NOTIFY_CMD "$STATUS"
|
2024-01-08 23:06:28 +01:00
|
|
|
echo "$@: $STATUS"
|
2024-01-05 12:30:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
_amused_jump() {
|
2024-01-08 23:06:28 +01:00
|
|
|
S="$(echo "$(amused show | cut -d'/' -f5-)" | sort -h | fzf -i -e)"
|
|
|
|
[ ! -z "$S" ] \
|
|
|
|
&& _amused_cmd jump "$S"
|
2024-01-05 12:30:05 +01:00
|
|
|
}
|