mpv: split conf files out of main nix code
This commit is contained in:
parent
bf953fbdb5
commit
56a2c4e49f
3
hosts/common/programs/mpv/console.conf
Normal file
3
hosts/common/programs/mpv/console.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# font size used by mpv's console (`); default 16
|
||||
# font_size=28
|
||||
scale=2
|
|
@ -139,130 +139,12 @@ in
|
|||
# for `watch_later`
|
||||
".local/state/mpv"
|
||||
];
|
||||
fs.".config/mpv/input.conf".symlink.text = ''
|
||||
# docs:
|
||||
# - <https://mpv.io/manual/master/#list-of-input-commands>
|
||||
# - script-binding: <https://mpv.io/manual/master/#command-interface-script-binding>
|
||||
# - properties: <https://mpv.io/manual/master/#property-list>
|
||||
|
||||
# let volume/power keys be interpreted by the system.
|
||||
# this is important for sxmo.
|
||||
# mpv defaults is POWER = close, VOLUME_{UP,DOWN} = adjust application-level volume
|
||||
POWER ignore
|
||||
VOLUME_UP ignore
|
||||
VOLUME_DOWN ignore
|
||||
|
||||
# uosc menu
|
||||
# text after the shebang is parsed by uosc to construct the menu and names
|
||||
menu script-binding uosc/menu
|
||||
s script-binding uosc/subtitles #! Subtitles
|
||||
a script-binding uosc/audio #! Audio tracks
|
||||
q script-binding uosc/stream-quality #! Stream quality
|
||||
p script-binding uosc/items #! Playlist
|
||||
c script-binding uosc/chapters #! Chapters
|
||||
> script-binding uosc/next #! Navigation > Next
|
||||
< script-binding uosc/prev #! Navigation > Prev
|
||||
o script-binding uosc/open-file #! Navigation > Open file
|
||||
# set video-aspect-override "-1" #! Utils > Aspect ratio > Default
|
||||
# set video-aspect-override "16:9" #! Utils > Aspect ratio > 16:9
|
||||
# set video-aspect-override "4:3" #! Utils > Aspect ratio > 4:3
|
||||
# set video-aspect-override "2.35:1" #! Utils > Aspect ratio > 2.35:1
|
||||
# script-binding uosc/audio-device #! Utils > Audio devices
|
||||
# script-binding uosc/editions #! Utils > Editions
|
||||
ctrl+s async screenshot #! Utils > Screenshot
|
||||
alt+i script-binding uosc/keybinds #! Utils > Key bindings
|
||||
O script-binding uosc/show-in-directory #! Utils > Show in directory
|
||||
# script-binding uosc/open-config-directory #! Utils > Open config directory
|
||||
ctrl+r run blast-to-default #! Audiocast
|
||||
ctrl+t set pause yes; run xdg-terminal-exec go2tv -v "''${stream-open-filename}" #! Cast
|
||||
# set pause yes; run xdg-terminal-exec go2tv -u "''${stream-open-filename}" #! Cast (...) > Stream
|
||||
# set pause yes; run go2tv #! Cast (...) > GUI
|
||||
# TODO: unify "Cast" and "Cast (stream)" options above.
|
||||
'';
|
||||
fs.".config/mpv/mpv.conf".symlink.text = ''
|
||||
# write ~/.local/state/mpv/watch_later on exit, to allow resume
|
||||
save-position-on-quit=yes
|
||||
# identify resumed files by filename only, since i use so many symlinks and doubt mpv does well with that.
|
||||
ignore-path-in-watch-later-config
|
||||
|
||||
# keep-open: don't exit on completion of last file in playlist
|
||||
keep-open=yes
|
||||
# seeking once at the end of the file causes auto-resume
|
||||
keep-open-pause=no
|
||||
|
||||
# force GUI, even for tracks w/o album art
|
||||
# see: <https://www.reddit.com/r/mpv/comments/rvrrpt/oscosdgui_and_arch_linux/>
|
||||
player-operation-mode=pseudo-gui
|
||||
|
||||
# use uosc instead (for On Screen Controls)
|
||||
osc=no
|
||||
# uosc provides its own seeking/volume indicators, so you also don't need this
|
||||
osd-bar=no
|
||||
# uosc will draw its own window controls if you disable window border
|
||||
border=no
|
||||
|
||||
# ao=alsa so that uosc can work with ao-volume (see my uosc patch)
|
||||
ao=alsa
|
||||
# with `ao-volume`, the max actually is 100.
|
||||
# to go higher you'll have to use the system's native controls.
|
||||
volume-max=100
|
||||
'';
|
||||
fs.".config/mpv/script-opts/osc.conf".symlink.text = ''
|
||||
# make the on-screen controls *always* visible
|
||||
# unfortunately, this applies to full-screen as well
|
||||
# - docs: <https://mpv.io/manual/master/#on-screen-controller-visibility>
|
||||
# if uosc is installed, this file is unused
|
||||
visibility=always
|
||||
'';
|
||||
fs.".config/mpv/script-opts/console.conf".symlink.text = ''
|
||||
# font size used by mpv's console (`); default 16
|
||||
# font_size=28
|
||||
scale=2
|
||||
'';
|
||||
fs.".config/mpv/script-opts/uosc.conf".symlink.text = let
|
||||
play_pause_btn = "cycle:play_arrow:pause:no=pause/yes=play_arrow";
|
||||
rev_btn = "command:replay_10:seek -10";
|
||||
fwd_btn = "command:forward_30:seek 30";
|
||||
in ''
|
||||
# docs:
|
||||
# - <https://github.com/tomasklaen/uosc>
|
||||
# - <https://github.com/tomasklaen/uosc/blob/main/src/uosc.conf>
|
||||
# - <https://superuser.com/questions/1775550/add-new-buttons-to-mpv-uosc-ui>
|
||||
timeline_style=bar
|
||||
timeline_line_width=4
|
||||
timeline_size=36
|
||||
timeline_persistency=paused,audio
|
||||
controls_persistency=paused,audio
|
||||
volume_persistency=audio
|
||||
|
||||
# speed_persistency=paused,audio
|
||||
# vvv want a close button?
|
||||
top_bar=always
|
||||
top_bar_persistency=paused,audio
|
||||
|
||||
controls=menu,<video>subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,space,${rev_btn},${play_pause_btn},${fwd_btn},space,speed:1.0,gap,<video>fullscreen
|
||||
|
||||
# text_border: shadow to place around icons/text which is rendered over the video
|
||||
text_border=5.0
|
||||
# border_radius: rounding of volume slider, etc.
|
||||
border_radius=5.0
|
||||
font_scale=1.5
|
||||
font_bold=yes
|
||||
# refine=text_width: slightly better text rendering
|
||||
refine=text_width
|
||||
color=foreground=ff8080,background_text=ff8080
|
||||
# N.B.: if `opacity=` is set non-empty, then ALL items must be specified (else they get 0 opacity).
|
||||
# opacity values *must* be a multiple of 0.1
|
||||
opacity=timeline=0.8,position=1,chapters=0.8,slider=0.8,slider_gauge=0.8,controls=0,speed=0.8,menu=1,submenu=0.4,border=1,title=0.8,tooltip=1,thumbnail=1,curtain=0.8,idle_indicator=0.8,audio_indicator=0.5,buffering_indicator=0.3,playlist_position=0.8
|
||||
|
||||
stream_quality_options=1440,1080,720,480,360,240,144
|
||||
'';
|
||||
fs.".config/mpv/script-opts/playlistmanager.conf".symlink.text = ''
|
||||
# script docs: <https://github.com/jonniek/mpv-playlistmanager>
|
||||
|
||||
# auto-populate playlist with other files in the same directory, on launch.
|
||||
loadfiles_on_start=yes
|
||||
'';
|
||||
fs.".config/mpv/input.conf".symlink.target = ./input.conf;
|
||||
fs.".config/mpv/mpv.conf".symlink.target = ./mpv.conf;
|
||||
fs.".config/mpv/script-opts/osc.conf".symlink.target = ./osc.conf;
|
||||
fs.".config/mpv/script-opts/console.conf".symlink.target = ./console.conf;
|
||||
fs.".config/mpv/script-opts/uosc.conf".symlink.target = ./uosc.conf;
|
||||
fs.".config/mpv/script-opts/playlistmanager.conf".symlink.target = ./playlistmanager.conf;
|
||||
|
||||
# mime.priority = 200; # default = 100; 200 means to yield to other apps
|
||||
mime.priority = 50; # default = 100; 50 in order to take precedence over vlc.
|
||||
|
|
39
hosts/common/programs/mpv/input.conf
Normal file
39
hosts/common/programs/mpv/input.conf
Normal file
|
@ -0,0 +1,39 @@
|
|||
# docs:
|
||||
# - <https://mpv.io/manual/master/#list-of-input-commands>
|
||||
# - script-binding: <https://mpv.io/manual/master/#command-interface-script-binding>
|
||||
# - properties: <https://mpv.io/manual/master/#property-list>
|
||||
|
||||
# let volume/power keys be interpreted by the system.
|
||||
# this is important for sxmo.
|
||||
# mpv defaults is POWER = close, VOLUME_{UP,DOWN} = adjust application-level volume
|
||||
POWER ignore
|
||||
VOLUME_UP ignore
|
||||
VOLUME_DOWN ignore
|
||||
|
||||
# uosc menu
|
||||
# text after the shebang is parsed by uosc to construct the menu and names
|
||||
menu script-binding uosc/menu
|
||||
s script-binding uosc/subtitles #! Subtitles
|
||||
a script-binding uosc/audio #! Audio tracks
|
||||
q script-binding uosc/stream-quality #! Stream quality
|
||||
p script-binding uosc/items #! Playlist
|
||||
c script-binding uosc/chapters #! Chapters
|
||||
> script-binding uosc/next #! Navigation > Next
|
||||
< script-binding uosc/prev #! Navigation > Prev
|
||||
o script-binding uosc/open-file #! Navigation > Open file
|
||||
# set video-aspect-override "-1" #! Utils > Aspect ratio > Default
|
||||
# set video-aspect-override "16:9" #! Utils > Aspect ratio > 16:9
|
||||
# set video-aspect-override "4:3" #! Utils > Aspect ratio > 4:3
|
||||
# set video-aspect-override "2.35:1" #! Utils > Aspect ratio > 2.35:1
|
||||
# script-binding uosc/audio-device #! Utils > Audio devices
|
||||
# script-binding uosc/editions #! Utils > Editions
|
||||
ctrl+s async screenshot #! Utils > Screenshot
|
||||
alt+i script-binding uosc/keybinds #! Utils > Key bindings
|
||||
O script-binding uosc/show-in-directory #! Utils > Show in directory
|
||||
# script-binding uosc/open-config-directory #! Utils > Open config directory
|
||||
ctrl+r run blast-to-default #! Audiocast
|
||||
ctrl+t set pause yes; run xdg-terminal-exec go2tv -v "${stream-open-filename}" #! Cast
|
||||
# set pause yes; run xdg-terminal-exec go2tv -u "${stream-open-filename}" #! Cast (...) > Stream
|
||||
# set pause yes; run go2tv #! Cast (...) > GUI
|
||||
# TODO: unify "Cast" and "Cast (stream)" options above.
|
||||
|
26
hosts/common/programs/mpv/mpv.conf
Normal file
26
hosts/common/programs/mpv/mpv.conf
Normal file
|
@ -0,0 +1,26 @@
|
|||
# write ~/.local/state/mpv/watch_later on exit, to allow resume
|
||||
save-position-on-quit=yes
|
||||
# identify resumed files by filename only, since i use so many symlinks and doubt mpv does well with that.
|
||||
ignore-path-in-watch-later-config
|
||||
|
||||
# keep-open: don't exit on completion of last file in playlist
|
||||
keep-open=yes
|
||||
# seeking once at the end of the file causes auto-resume
|
||||
keep-open-pause=no
|
||||
|
||||
# force GUI, even for tracks w/o album art
|
||||
# see: <https://www.reddit.com/r/mpv/comments/rvrrpt/oscosdgui_and_arch_linux/>
|
||||
player-operation-mode=pseudo-gui
|
||||
|
||||
# use uosc instead (for On Screen Controls)
|
||||
osc=no
|
||||
# uosc provides its own seeking/volume indicators, so you also don't need this
|
||||
osd-bar=no
|
||||
# uosc will draw its own window controls if you disable window border
|
||||
border=no
|
||||
|
||||
# ao=alsa so that uosc can work with ao-volume (see my uosc patch)
|
||||
ao=alsa
|
||||
# with `ao-volume`, the max actually is 100.
|
||||
# to go higher you'll have to use the system's native controls.
|
||||
volume-max=100
|
5
hosts/common/programs/mpv/osc.conf
Normal file
5
hosts/common/programs/mpv/osc.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# make the on-screen controls *always* visible
|
||||
# unfortunately, this applies to full-screen as well
|
||||
# - docs: <https://mpv.io/manual/master/#on-screen-controller-visibility>
|
||||
# if uosc is installed, this file is unused
|
||||
visibility=always
|
4
hosts/common/programs/mpv/playlistmanager.conf
Normal file
4
hosts/common/programs/mpv/playlistmanager.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
# script docs: <https://github.com/jonniek/mpv-playlistmanager>
|
||||
|
||||
# auto-populate playlist with other files in the same directory, on launch.
|
||||
loadfiles_on_start=yes
|
32
hosts/common/programs/mpv/uosc.conf
Normal file
32
hosts/common/programs/mpv/uosc.conf
Normal file
|
@ -0,0 +1,32 @@
|
|||
# docs:
|
||||
# - <https://github.com/tomasklaen/uosc>
|
||||
# - <https://github.com/tomasklaen/uosc/blob/main/src/uosc.conf>
|
||||
# - <https://superuser.com/questions/1775550/add-new-buttons-to-mpv-uosc-ui>
|
||||
timeline_style=bar
|
||||
timeline_line_width=4
|
||||
timeline_size=36
|
||||
timeline_persistency=paused,audio
|
||||
controls_persistency=paused,audio
|
||||
volume_persistency=audio
|
||||
|
||||
# speed_persistency=paused,audio
|
||||
# vvv want a close button?
|
||||
top_bar=always
|
||||
top_bar_persistency=paused,audio
|
||||
|
||||
controls=menu,<video>subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,space,command:replay_10:seek -10,cycle:play_arrow:pause:no=pause/yes=play_arrow,command:forward_30:seek 30,space,speed:1.0,gap,<video>fullscreen
|
||||
|
||||
# text_border: shadow to place around icons/text which is rendered over the video
|
||||
text_border=5.0
|
||||
# border_radius: rounding of volume slider, etc.
|
||||
border_radius=5.0
|
||||
font_scale=1.5
|
||||
font_bold=yes
|
||||
# refine=text_width: slightly better text rendering
|
||||
refine=text_width
|
||||
color=foreground=ff8080,background_text=ff8080
|
||||
# N.B.: if `opacity=` is set non-empty, then ALL items must be specified (else they get 0 opacity).
|
||||
# opacity values *must* be a multiple of 0.1
|
||||
opacity=timeline=0.8,position=1,chapters=0.8,slider=0.8,slider_gauge=0.8,controls=0,speed=0.8,menu=1,submenu=0.4,border=1,title=0.8,tooltip=1,thumbnail=1,curtain=0.8,idle_indicator=0.8,audio_indicator=0.5,buffering_indicator=0.3,playlist_position=0.8
|
||||
|
||||
stream_quality_options=1440,1080,720,480,360,240,144
|
Loading…
Reference in New Issue
Block a user