@@ -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
1919cmd () { 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
2323Options:
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
2828parse_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