From 2feba75a80261b7b8dfb257218e6d0ff3546ca14 Mon Sep 17 00:00:00 2001 From: grothedev Date: Mon, 17 Jun 2024 13:34:13 -0500 Subject: added v4l2-ctl tool which is WIP. also apparently my local git settings were reset at some point and i didn't even realize it --- mostrecentrecursively.sh | 2 ++ totxt | 1 + v4l-tool/brght | 1 + v4l-tool/cntrst | 1 + v4l-tool/satrtn | 1 + v4l-tool/settings-setter.sh | 21 +++++++++++++++++++++ 6 files changed, 27 insertions(+) create mode 100755 v4l-tool/brght create mode 100755 v4l-tool/cntrst create mode 100755 v4l-tool/satrtn create mode 100644 v4l-tool/settings-setter.sh diff --git a/mostrecentrecursively.sh b/mostrecentrecursively.sh index cc2b8bf..7bd8899 100755 --- a/mostrecentrecursively.sh +++ b/mostrecentrecursively.sh @@ -1,2 +1,4 @@ #!/bin/bash find $1 -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head + +#this script is slower than recentlymodifiedfilesrec.sh diff --git a/totxt b/totxt index 0ef1d60..ddf114c 100755 --- a/totxt +++ b/totxt @@ -1,5 +1,6 @@ #!/bin/bash # +# NOTE: very old script. i have since made a better one. # this script will generate a text file containing all the text of the files (including odt files) from the given folder # args: # none: use current dir, output results diff --git a/v4l-tool/brght b/v4l-tool/brght new file mode 100755 index 0000000..9ebb81f --- /dev/null +++ b/v4l-tool/brght @@ -0,0 +1 @@ +v4l2-ctl -C brightness | cut -d' ' -f2 diff --git a/v4l-tool/cntrst b/v4l-tool/cntrst new file mode 100755 index 0000000..df7c96c --- /dev/null +++ b/v4l-tool/cntrst @@ -0,0 +1 @@ +v4l2-ctl -C contrast | cut -d' ' -f2 diff --git a/v4l-tool/satrtn b/v4l-tool/satrtn new file mode 100755 index 0000000..a061cb7 --- /dev/null +++ b/v4l-tool/satrtn @@ -0,0 +1 @@ +v4l2-ctl -C saturation | cut -d' ' -f2 diff --git a/v4l-tool/settings-setter.sh b/v4l-tool/settings-setter.sh new file mode 100644 index 0000000..2c2d53a --- /dev/null +++ b/v4l-tool/settings-setter.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +#this daemon will keep the brightness, contrast, saturation of the webcam set based on the time of day + +#brightness. highest during darkest +b_mx=245 +b_mn=145 + +#contrast. highest during darkest +c_mx=160 +c_mn=100 + +#saturation. constant for now + +while [[ true ]]; do + th=`date +%H` + tm=`date +%M` + p=$(((60*${th}+${tm})/1440)) #percent through day + + sleep 15 +done -- cgit v1.2.3