Skip to content

Commit 8345b2c

Browse files
committed
Change backticks to parantheses
1 parent 85bf2f2 commit 8345b2c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mpvcam

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ main () { parse_opts "$@"
44
cmd="mpv --pause=no --profile=low-latency --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video$camera --untimed --cache=no --force-seekable=no --no-osc --script-opts-add=osc-visibility=never --really-quiet --title=Webcam"
55

66
if [ -n "$toggle" ]; then
7-
if [ `ps axh | grep "$cmd" | wc -l` -le 1 ]; then
7+
if [ $(ps axh | grep "$cmd" | wc -l) -le 1 ]; then
88
cmd
9-
elif [ `xdotool search --onlyvisible --name Webcam | wc -l` -ge 1 ]; then
10-
xdotool windowunmap `xdotool search --name Webcam`
9+
elif [ $(xdotool search --onlyvisible --name Webcam | wc -l) -ge 1 ]; then
10+
xdotool windowunmap $(xdotool search --name Webcam)
1111
else
12-
xdotool windowmap `xdotool search --name Webcam`
12+
xdotool windowmap $(xdotool search --name Webcam)
1313
fi
1414
else
1515
cmd
@@ -18,16 +18,16 @@ main () { parse_opts "$@"
1818

1919
cmd() { pkill -f /dev/video$camera || $cmd; }
2020

21-
help() { echo -n "Usage: `basename $0` [options] [camera #]
21+
help() { echo -n "Usage: $(basename $0) [options] [camera #]
2222
2323
Options:
24-
-t|--toggle │ Hide/unhide `basename $0`
24+
-t|--toggle │ Hide/unhide $(basename $0)
2525
-h|--help │ Print this help message and exit
2626
"; }
2727

2828
parse_opts() {
29-
: "${config_dir:=${XDG_CONFIG_HOME:-$HOME/.config}/`basename $0`}"
30-
: "${config_file:=$config_dir/`basename $0`.conf}"
29+
: "${config_dir:=${XDG_CONFIG_HOME:-$HOME/.config}/$(basename $0)}"
30+
: "${config_file:=$config_dir/$(basename $0).conf}"
3131
[ -f "$config_file" ] && . "$config_file"
3232

3333
die() { echo "$*" >&2; exit 2; } # complain to STDERR and exit with error

0 commit comments

Comments
 (0)