Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions docs/USER_OPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,22 @@ Create `modernz.conf` in your mpv script-opts directory:

Customize the button function based on mouse action same as you would in `input.conf`. [[details](https://mpv.io/manual/master/#list-of-input-commands)]

| Type | Option | Function |
| -------------------- | ------------------------------ | --------------------------------------------------------------------------- |
| Title (seekbar) | title_mbtn_left_command | `show-text ${media-title}` |
| | title_mbtn_right_command | `show-text ${filename}` |
| Playlist Button | playlist_mbtn_left_command | `script-binding select/select-playlist; script-message-to modernz osc-hide` |
| | playlist_mbtn_right_command | `show-text ${playlist} 3000` |
| Audio Button | audio_track_mbtn_left_command | `script-binding select/select-aid; script-message-to modernz osc-hide` |
| | audio_track_mbtn_right_command | `cycle audio` |
| | audio_track_wheel_down_command | `cycle audio` |
| | audio_track_wheel_up_command | `cycle audio down` |
| Subtitle Button | sub_track_mbtn_left_command | `script-binding select/select-sid; script-message-to modernz osc-hide` |
| | sub_track_mbtn_right_command | `cycle sub` |
| | sub_track_wheel_down_command | `cycle sub` |
| | sub_track_wheel_up_command | `cycle sub down` |
| Chapter Skip Buttons | ch_prev_mbtn_left_command | `no-osd add chapter -1` |
| | ch_prev_mbtn_right_command | `script-binding select/select-chapter; script-message-to modernz osc-hide` |
| | ch_next_mbtn_left_command | `no-osd add chapter 1` |
| | ch_next_mbtn_right_command | `script-binding select/select-chapter; script-message-to modernz osc-hide` |
| Type | Option | Function |
| -------------------- | ------------------------------ | --------------------------------------------------------------------------------|
| Title (seekbar) | title_mbtn_left_command | `show-text ${media-title}` |
| | title_mbtn_right_command | `show-text ${filename}` |
| Playlist Button | playlist_mbtn_left_command | `script-binding select/select-playlist; script-message-to modernz osc-hide` |
| | playlist_mbtn_right_command | `show-text ${playlist} 3000` |
| Volume Control | volumectrl_mbtn_right_command | `script-binding select/select-audio-device; script-message-to modernz osc-hide` |
| Audio Button | audio_track_mbtn_left_command | `script-binding select/select-aid; script-message-to modernz osc-hide` |
| | audio_track_mbtn_right_command | `cycle audio` |
| | audio_track_wheel_down_command | `cycle audio` |
| | audio_track_wheel_up_command | `cycle audio down` |
| Subtitle Button | sub_track_mbtn_left_command | `script-binding select/select-sid; script-message-to modernz osc-hide` |
| | sub_track_mbtn_right_command | `cycle sub` |
| | sub_track_wheel_down_command | `cycle sub` |
| | sub_track_wheel_up_command | `cycle sub down` |
| Chapter Skip Buttons | ch_prev_mbtn_left_command | `no-osd add chapter -1` |
| | ch_prev_mbtn_right_command | `script-binding select/select-chapter; script-message-to modernz osc-hide` |
| | ch_next_mbtn_left_command | `no-osd add chapter 1` |
| | ch_next_mbtn_right_command | `script-binding select/select-chapter; script-message-to modernz osc-hide` |
3 changes: 3 additions & 0 deletions modernz.conf
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ title_mbtn_right_command=show-text ${filename}
playlist_mbtn_left_command=script-binding select/select-playlist; script-message-to modernz osc-hide
playlist_mbtn_right_command=show-text ${playlist} 3000

# volume control icon mouse actions
volumectrl_mbtn_right_command=script-binding select/select-audio-device; script-message-to modernz osc-hide

# audio button mouse actions
audio_track_mbtn_left_command=script-binding select/select-aid; script-message-to modernz osc-hide
audio_track_mbtn_right_command=cycle audio
Expand Down
4 changes: 4 additions & 0 deletions modernz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ local user_opts = {
playlist_mbtn_left_command = "script-binding select/select-playlist; script-message-to modernz osc-hide",
playlist_mbtn_right_command = "show-text ${playlist} 3000",

-- volume control icon mouse actions
volumectrl_mbtn_right_command = "script-binding select/select-audio-device; script-message-to modernz osc-hide",

-- audio button mouse actions
audio_track_mbtn_left_command = "script-binding select/select-aid; script-message-to modernz osc-hide",
audio_track_mbtn_right_command = "cycle audio",
Expand Down Expand Up @@ -1770,6 +1773,7 @@ local function osc_init()
end
end
ne.eventresponder["mbtn_left_up"] = function () mp.commandv("cycle", "mute") end
ne.eventresponder["mbtn_right_up"] = command_callback(user_opts.volumectrl_mbtn_right_command)
ne.eventresponder["wheel_up_press"] =
function ()
if state.mute then mp.commandv("cycle", "mute") end
Expand Down