aboutsummaryrefslogtreecommitdiff
path: root/scripts/vlc
blob: 8570b53c26dc42248f64982eae9a0ecd1f199706 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -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