Skip to content

Commit

Permalink
Merge pull request #1 from jmickelin/main
Browse files Browse the repository at this point in the history
Split behaviour of the "showtitle" option into two separate options
  • Loading branch information
cyl0 authored Oct 5, 2021
2 parents 3ae7946 + b4dc1af commit b4b1399
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mordenx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ local user_opts = {
seekbarkeyframes = true, -- use keyframes when dragging the seekbar
title = '${media-title}', -- string compatible with property-expansion
-- to be shown as OSC title
showtitle = true, -- show title and no hide timeout on pause
showtitle = true, -- show title in OSC
showonpause = true, -- whether to disable the hide timeout on pause
timetotal = true, -- display total time instead of remaining time?
timems = false, -- Display time down to millliseconds by default
visibility = 'auto', -- only used at init to set visibility_mode(...)
Expand Down Expand Up @@ -135,7 +136,7 @@ local state = {
border = true,
maximized = false,
osd = mp.create_osd_overlay('ass-events'),
lastvisibility = user_opts.visibility, -- save last visibility on pause if showtitle
lastvisibility = user_opts.visibility, -- save last visibility on pause if showonpause
fulltime = user_opts.timems,
}

Expand Down Expand Up @@ -1529,7 +1530,7 @@ end

function pause_state(name, enabled)
state.paused = enabled
if user_opts.showtitle then
if user_opts.showonpause then
if enabled then
state.lastvisibility = user_opts.visibility
visibility_mode("always", true)
Expand Down

0 comments on commit b4b1399

Please sign in to comment.