rien / reStream

Stream your reMarkable screen over SSH.
MIT License
748 stars 57 forks source link

Suggestion: Set Source IP via Environment Variable #88

Closed cloudsftp closed 2 years ago

cloudsftp commented 2 years ago

What do you think about adding support to set arguments of the script via environment variables?

I sketched a solution for the source IP, since I currently have to type it every time I want to stream:

diff --git a/reStream.sh b/reStream.sh
index f750914..4cc6fc7 100755
--- a/reStream.sh
+++ b/reStream.sh
@@ -15,6 +15,9 @@ window_title=reStream     # stream window title is reStream
 video_filters=""          # list of ffmpeg filters to apply
 unsecure_connection=false # Establish a unsecure connection that is faster

+# values from environment
+[ -n "$REMARKABLE_IP" ] && remarkable="$REMARKABLE_IP"
+
 # loop through arguments and process them
 while [ $# -gt 0 ]; do
     case "$1" in

or here: https://github.com/cloudsftp/reStream/tree/feature/environment_variables

rien commented 2 years ago

I have added the option to set the remarkable IP with commit 3862d9c5c85d09c58e985f01049989f15a3d2830 Do you need a release for this?

cloudsftp commented 2 years ago

Thank you! It's fine if you release it with your next planned release.