#!/bin/sh set -eu NIX=/run/current-system/sw/bin/vlc GUIX=/run/current-system/profile/bin/vlc if [ -e "$NIX" ]; then VLC="$NIX" elif [ -e "$GUIX" ]; then VLC="$GUIX" else echo "Can't guess VLC executable" exit 1 fi if [ -z "${1:-}" ]; then "$VLC" else "$VLC" "$1" echo "$1" >> ~/archive/vlc/queue.txt fi