Skip to content

Commit

Permalink
Add toggle for non-standard pip and speed buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Zren committed May 27, 2022
1 parent 89111cf commit fe63f54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ A complete list of configuration keys can be found at the top of [`osc_tethys.lu

```ini
# Config
showPictureInPictureButton=yes
showSpeedButton=yes
skipBy=5 # skipback/skipfrwd amount in seconds
skipByMore=30 # RightClick skipback/skipfrwd amount in seconds
skipMode=exact # "exact" (mordenx default) or "relative+keyframes" (mpv default)
Expand Down
4 changes: 4 additions & 0 deletions osc_tethys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ local utils = require 'mp.utils'
-- Linux: ~/config/mpv/script-opts/tethys.conf
local tethys = {
-- Config
showPictureInPictureButton = true,
showSpeedButton = true,
skipBy = 5, -- skipback/skipfrwd amount in seconds
skipByMore = 30, -- RightClick skipback/skipfrwd amount in seconds
skipMode = "exact", -- "exact" (mordenx default) or "relative+keyframes" (mpv default)
Expand Down Expand Up @@ -4284,6 +4286,7 @@ function osc_init()

--tog_pip
ne = new_element("tog_pip", "button")
ne.visible = tethys.showPictureInPictureButton
ne.content = function ()
if (tethys.isPictureInPicture) then
return tethysIcon_pip_exit
Expand Down Expand Up @@ -4524,6 +4527,7 @@ function osc_init()

-- speed
ne = new_element("speed", "button")
ne.visible = tethys.showSpeedButton
ne.content = function()
return tethysIcon_speed
end
Expand Down

0 comments on commit fe63f54

Please sign in to comment.