History

saver_mpv: allow to set custom flags using XSECURELOCK_VIDEOS_FLAGS (#130)

This also applies to `saver_mplayer`, hence the more generic name.

Vincent Bernat committed 5 years ago

Commit 84d5bb41 parent 1d7966b3 files · +6 −0Browse files

Unified · Split

3 files
  1. README.md +2 −0
  2. helpers/saver_mplayer.in +2 −0
  3. helpers/saver_mpv.in +2 −0
README.md+2−0
@@ -411,6 +411,8 @@ Options to XSecureLock can be passed by environment variables: · 410 unmodified lines
411411 `Ctrl-Alt-O` are pressed (think "_other_ user"). Typical values could be
412412 `lxdm -c USER_SWITCH`, `dm-tool switch-to-greeter`, `gdmflexiserver` or
413413 `kdmctl reserve`, depending on your desktop environment.
414+* `XSECURELOCK_VIDEOS_FLAGS`: flags to append when invoking mpv/mplayer with
415+ `saver_mpv` or `saver_mplayer`. Defaults to empty.
414416 * `XSECURELOCK_WAIT_TIME_MS`: Milliseconds to wait after dimming (and before
415417 locking) when above xss-lock command line is used. Should be at least as
416418 large as the period time set using "xset s". Also used by `wait_nonidle` to
helpers/saver_mplayer.in+2−0
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 # limitations under the License.
1616
1717 : ${XSECURELOCK_LIST_VIDEOS_COMMAND:=find ~/Videos -type f}
18+: ${XSECURELOCK_VIDEOS_FLAGS:=}
1819
1920 sh -c "$XSECURELOCK_LIST_VIDEOS_COMMAND" | shuf | head -n 256 |\
2021 @path_to_mplayer@ \
@@ -26,4 +27,5 @@ sh -c "$XSECURELOCK_LIST_VIDEOS_COMMAND" | shuf | head -n 256 |\ · 5 unmodified lines
2627 -fixed-vo \
2728 -nosound \
2829 -shuffle \
30+ ${XSECURELOCK_VIDEOS_FLAGS} \
2931 -playlist -
helpers/saver_mpv.in+2−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616
1717 : ${XSECURELOCK_LIST_VIDEOS_COMMAND:=find ~/Videos -type f}
1818 : ${XSECURELOCK_IMAGE_DURATION_SECONDS:=1}
19+: ${XSECURELOCK_VIDEOS_FLAGS:=}
1920
2021 # Run mpv in a loop so we can quickly restart mpv in case it exits (has shown
2122 # the last picture/video).
@@ -30,6 +31,7 @@ while true; do · 8 unmodified lines
3031 --image-display-duration="${XSECURELOCK_IMAGE_DURATION_SECONDS}" \
3132 --shuffle \
3233 --loop-playlist=inf \
34+ ${XSECURELOCK_VIDEOS_FLAGS} \
3335 --playlist=- &
3436 # Avoid spinning if mpv exits immediately, but don't wait to restart mpv in
3537 # the common case.