summary refs log tree commit diff
path: root/.config/mpv/mvi/script-opts/detect_image.conf
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2024-11-25 13:30:08 +0100
committerRobert Günzler <r@gnzler.io>2024-11-25 13:58:25 +0100
commit18e3848110da0a59843058927ea04b496f5db2a5 (patch)
treed54e7e1ab025d61507a0b1c3523c08abf400575d /.config/mpv/mvi/script-opts/detect_image.conf
parent8f29be993dad465c1bb108462dc1bd63706649a5 (diff)
update mpv config
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/mpv/mvi/script-opts/detect_image.conf')
-rw-r--r--.config/mpv/mvi/script-opts/detect_image.conf17
1 files changed, 17 insertions, 0 deletions
diff --git a/.config/mpv/mvi/script-opts/detect_image.conf b/.config/mpv/mvi/script-opts/detect_image.conf
new file mode 100644
index 0000000..586fb95
--- /dev/null
+++ b/.config/mpv/mvi/script-opts/detect_image.conf
@@ -0,0 +1,17 @@
+# commands to execute when a file detected as an image (1 frame, no audio) is loaded or unloaded
+
+# an image was loaded, and the previous file was not an image (or there was no previous file)
+command_on_first_image_loaded=
+# an image was loaded (regardless of what the previous file was)
+command_on_image_loaded=
+# a non-image was loaded, and the previous file was an image
+command_on_non_image_loaded=
+
+# the purpose of these "hooks" is to let you change bindings, profiles, reset properties...
+# see https://mpv.io/manual/master/#list-of-input-commands for general command information
+# note that there is no such thing as "unloading a profile", to emulate this you must create an opposite profile and load that
+
+# example possible values:
+#command_on_first_image_loaded=apply-profile image; enable-section image-viewer; script-message status-line-enable
+#command_on_image_loaded=no-osd set video-pan-x 0; script-message align-border "" -1
+#command_on_non_image_loaded=disable-section image-viewer; no-osd set video-pan-x 0; no-osd set video-pan-y 0; no-osd set video-zoom 0; script-message status-line-disable