open dir of video file on alt+enter

This commit is contained in:
Alexander Bocken 2023-11-03 14:53:41 +01:00
parent 69d50cf8f8
commit d93782c907
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8
2 changed files with 9 additions and 1 deletions

View File

@ -6,7 +6,7 @@
# Copy this file and uncomment and edit the bindings you want to change. # Copy this file and uncomment and edit the bindings you want to change.
# #
# List of commands and further details: DOCS/man/input.rst # List of commands and further details: DOCS/man/input.rst
# List of special keys: --input-keylist # Liut of special keys: --input-keylist
# Keybindings testing mode: mpv --input-test --force-window --idle # Keybindings testing mode: mpv --input-test --force-window --idle
# #
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore'). # Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
@ -63,6 +63,7 @@ j no-osd seek -5 exact # seek exactly 5 seconds backward
#Alt+down add video-pan-y -0.1 # move the video up #Alt+down add video-pan-y -0.1 # move the video up
Alt++ add video-zoom 0.1 # zoom in Alt++ add video-zoom 0.1 # zoom in
Alt+- add video-zoom -0.1 # zoom out Alt+- add video-zoom -0.1 # zoom out
Alt+ENTER run "open_at_video" "${=path}"
#Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 # reset zoom and pan settings #Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 # reset zoom and pan settings
#PGUP add chapter 1 # seek to the next chapter #PGUP add chapter 1 # seek to the next chapter
#PGDWN add chapter -1 # seek to the previous chapter #PGDWN add chapter -1 # seek to the previous chapter

7
.local/bin/tools/open_at_video Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
if echo $1 | grep -qv '^/'; then
absolute_path_file="$(pwd)/$1"
else
absolute_path_file="$1"
fi
$TERMINAL $FILE "${absolute_path_file%/*}"