# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
#########################
# Useful Links
######
# https://mpv.io/manual/master/#javascript
###
# dotfiles
##
# https://github.com/duckpuppy/dotfiles/tree/master/.config/mpv
##

#########################
# mpv > keyboard shortcut / binding file
# NOTE: `meta` refers to the `⌘` on macOS
# NOTE: to call a script within ~/.config/mpv/scripts using a binding
# ...ex: "<key-binding> script_binding <script_name.{js,lua}>"
##

# How to turn off subtitles for a video?
# ANSWER subtitle display can be toggled with `v`
# ANSWER to cycle through the onscreen subtitles, `j`

# NOTE:
# #T cycle ontop # toggle video window ontop of other windows

# Volume on mouse wheel
# WHEEL_UP   add volume 2
# WHEEL_DOWN add volume -2

### seeking ###
# relative
RIGHT osd-msg-bar seek 5 exact
LEFT osd-msg-bar seek -5 exact
# jump to beginning of playback, ie. the start of a file
g-g seek 0 absolute 
# TODO: fixme
shift+G seek 100 absolute-percent

### Volume ###
# NOTE: the below two bindings will remove or override the default bindings of seeking through the video. YT has etched my noodle
UP osd-msg-bar add volume 5
DOWN osd-msg-bar add volume -5

### axis ###
AXIS_UP add volume 2
AXIS_DOWN add volume -2

### seeking ###
AXIS_LEFT seek 5 exact
AXIS_RIGHT seek -5 exact

### rotation ###
# rotate video counterclockwise
# NOTE: `left` refers to the left arrow key, ←
meta+shift+left add video-rotate -90

# rotate video clockwise
# NOTE: `right` refers to the right arrow key, →
meta+shift+right add video-rotate 90

### sizing ###
# adjust window size
meta+] multiply window-scale 1.1
meta+[ multiply window-scale 0.9

# zoom window
meta+= add video-zoom 0.25
meta+- add video-zoom -0.25

# NOTE: key-bindings can directly be set within a script file itself.

# TODO: conjure up a key-binding that calls a script to save the window size and placement.
# TODO; conjure up a script that loads the previously saved settings into the current instance of mpv

# NOTE: the below keybinding is a useful DEBUG for on screen messages
# meta+s show-text "some freaking overlay text"

# macOS / MBP > Media Keys
PAUSE cycle pause
PLAYPAUSE cycle pause

### playback & jelly ###
# YouTube playback speed FTW  ...relative to current pb speed
Shift+> multiply speed 1.1
Shift+< multiply speed 0.9

# NOTE: playback speed absolute
#  mash `delete` / `backspace` to reset pb&j to 1.0

### playback > audio streams
# NOTE: useful for working with media files that contain multiple audio stream
# To list / print available video & audio streams
# (fn)F9
# NOTE: keyboard with media keys defined to the function keys may require an additional key press
# To cycle / play the next audio track
# (shift)+3 or `#`

################
# Sample: `input.conf`
#...https://github.com/FichteFoll/dotfiles/blob/master/mpv/.config/mpv/input.conf
# 
