dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 8f86bff03b2866b335c2e29f6ec59d09581a7685
parent 5a6b27e60244385bce9affee992f8a33ce45ecf4
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sat, 22 Feb 2020 21:56:40 +0100

playhere: mpv the arguments, send notification for each file

Former-commit-id: 0d96d80344f30d5031a006c16862de8a0cb39291
Diffstat:
Ascripts/playhere | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/scripts/playhere b/scripts/playhere @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +if ! command -v mpv &>/dev/null; then + echo "mpv not installed." >&2 + exit 1 +fi +if ! command -v terminal-notifier &>/dev/null; then + echo "terminal-notifier not installed." >&2 + exit 1 +fi +[ $# -gt 0 ] || { echo "Arguments required." && exit 1; } + +trap "exit 0" INT TERM EXIT + +for i in "$@"; do + terminal-notifier -group mpv -title "$i" -message "Now playing $i"; + mpv --no-video --volume=50 "$i" +done