Skip to content

rossy/mpv-repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

repl.lua

repl.lua is a REPL for mpv input commands. It is displayed on the video window. It also shows log messages.

screenshot

Keybindings

Key Action
` Show the REPL
Esc Hide the REPL
Enter Run the typed command
Shift + Enter Type a literal newline character
Ctrl + , Ctrl + Move cursor to previous/next word
, Navigate command history
PgUp Go to the first command in the history
PgDn Stop navigating command history
Insert Toggle insert mode
Shift + Insert Paste text (uses the primary selection on X11)
Tab Complete the command or property name at the cursor
Ctrl + C Clear current line
Ctrl + K Delete text from the cursor to the end of the line
Ctrl + L Clear all log messages from the console
Ctrl + U Delete text from the cursor to the beginning of the line
Ctrl + V Paste text (uses the clipboard on X11)
Ctrl + W Delete text from the cursor to the beginning of the current word

Commands

Command Action
script-message-to repl type "<text>" Show the REPL and pre-fill it with the provided text

Known issues

  • Pasting text is slow on Windows
  • Non-ASCII keyboard input doesn't work
  • The cursor keys move between Unicode code-points, not grapheme clusters

Disclaimer

This script was written with the hope that it would be useful, but the method of keyboard input is a bit of a hack (mpv wasn't designed to be a GUI toolkit,) so there are no guarantees that it will be useful or continue to work.

Copying

This script is released under the ISC licence.

The color scheme for log messages is Chris Kempson's Base16 Eighties

Releases

No releases published

Packages

No packages published

Languages