2023-12-16 21:14:33 -05:00
|
|
|
{pkgs, ...}: {
|
2023-12-16 21:51:43 -05:00
|
|
|
# For kdialog-open-files
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
kdialog
|
|
|
|
];
|
|
|
|
|
2023-12-16 16:03:36 -05:00
|
|
|
programs.mpv = {
|
|
|
|
enable = true;
|
|
|
|
|
2023-12-16 21:51:43 -05:00
|
|
|
# https://github.com/mpv-player/mpv/wiki/User-Scripts
|
2023-12-16 21:14:33 -05:00
|
|
|
scripts = with (import ./scripts pkgs); [
|
2023-12-16 16:03:36 -05:00
|
|
|
modernx
|
2023-12-16 21:14:33 -05:00
|
|
|
# Dep of touch-gestures
|
|
|
|
pointer-event
|
|
|
|
touch-gestures
|
2023-12-16 21:51:43 -05:00
|
|
|
# Ctrl + o
|
|
|
|
kdialog-open-files
|
|
|
|
persist-properties
|
|
|
|
undo-redo
|
2023-12-16 16:03:36 -05:00
|
|
|
];
|
2023-12-16 21:14:33 -05:00
|
|
|
|
|
|
|
scriptOpts = {
|
2023-12-16 21:51:43 -05:00
|
|
|
persist_properties = {
|
|
|
|
properties = "volume,sub-scale";
|
|
|
|
};
|
|
|
|
|
2023-12-16 21:14:33 -05:00
|
|
|
# Touch gestures default
|
|
|
|
pointer-event = {
|
|
|
|
margin_left = 0;
|
|
|
|
margin_right = 80;
|
|
|
|
margin_top = 50;
|
|
|
|
margin_bottom = 130;
|
|
|
|
ignore_left_single_long_while_window_dragging = true;
|
|
|
|
left_single = "cycle pause";
|
|
|
|
left_double = "script-message-to touch_gestures double";
|
|
|
|
left_long = "script-binding uosc/menu-blurred";
|
|
|
|
left_drag_start = "script-message-to touch_gestures drag_start";
|
|
|
|
left_drag_end = "script-message-to touch_gestures drag_end";
|
|
|
|
left_drag = "script-message-to touch_gestures drag";
|
|
|
|
};
|
|
|
|
|
|
|
|
touch-gestures = {
|
|
|
|
# valid options are:
|
|
|
|
# 'playlist' for changing the playlist item by swiping
|
|
|
|
# 'seek' for seeking by dragging
|
|
|
|
horizontal_drag = "seek";
|
|
|
|
|
|
|
|
# scale seeking based on the duration of the video
|
|
|
|
proportional_seek = true;
|
|
|
|
|
|
|
|
# scale factor for seeking
|
|
|
|
seek_scale = 1;
|
|
|
|
};
|
|
|
|
};
|
2023-12-16 16:03:36 -05:00
|
|
|
};
|
|
|
|
}
|