-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchill
More file actions
executable file
·61 lines (49 loc) · 1.3 KB
/
chill
File metadata and controls
executable file
·61 lines (49 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# plays lofi with mpv
# Author : Liam Timms
#=== FUNCTION ================================================================
# NAME: usage
# DESCRIPTION: Display usage information.
#===============================================================================
function usage() {
echo "Usage : $0 [options] [--]
Options:
-l|lofi lofi beats
-p|piano relaxing piano
-s|social social network
-h|help Display this message
-v|version Display script version"
} # ---------- end of function usage ----------
#-----------------------------------------------------------------------
# Handle command line arguments
#-----------------------------------------------------------------------
while getopts ":hvpls" opt; do
case $opt in
h | help)
usage
exit 0
;;
v | version)
echo "$0 -- Version $__ScriptVersion"
exit 0
;;
p | piano)
mpv --volume=50 --no-video https://www.youtube.com/watch?v=XULUBg_ZcAU
exit 0
;;
l | lofi)
mpv --volume=50 --no-video https://www.youtube.com/watch?v=5qap5aO4i9A
exit 0
;;
s | social)
mpv --volume=50 --no-video https://youtu.be/yydZbVoCbn0
exit 0
;;
*)
echo -e "\n Option does not exist : $OPTARG\n"
usage
exit 1
;;
esac # --- end of case ---
done
shift $(($OPTIND - 1))