diff --git a/.bin/cam b/.bin/cam index 02b8196..b73b3c5 100755 --- a/.bin/cam +++ b/.bin/cam @@ -12,7 +12,7 @@ do hd) shift; _res="-video_size 1280x720" ;; sd) shift; _res="-video_size 640x360" ;; max) shift; _res=max ;; - [0-9]*x[0-9]*) shift; _res="$arg" ;; + [0-9]*x[0-9]*) shift; _res="-video_size $arg" ;; *) _dev="$arg" ;; esac done @@ -45,15 +45,18 @@ then exit 0 fi +command="$(echo "ffplay -loglevel quiet -f v4l2 $_format $_res -i $_dev" | xargs)" + if [ ! -z "$_start" ] then - ffplay -loglevel quiet -f v4l2 $_format $_res -i $_dev & + echo "starting: $command" + $command > /dev/null 2>&1 & exit 0 fi if [ ! -z "$_stop" ] then - # close enough... - pkill -f "ffplay -loglevel quiet -f v4l2" + echo "stopping: $command" + pkill -qf "$command" exit 0 fi diff --git a/.config/spectrwm/spectrwm.conf b/.config/spectrwm/spectrwm.conf index 9a7fa74..08f0e0a 100644 --- a/.config/spectrwm/spectrwm.conf +++ b/.config/spectrwm/spectrwm.conf @@ -68,7 +68,7 @@ bar_at_bottom = 0 # ++ A literal ‘+’ # +@ Prefix for text markup sequences -bar_format = +S +@bg=2;+L+@bg=0; +W +|R +A +bar_format = +S +@bg=2;+L+@bg=0; i:+M +W +|R +A # +-------------------------------------------------- # | WORKSPACE LAYOUT