occivink / mpv-image-viewer

Configuration, scripts and tips for using mpv as an image viewer
The Unlicense
299 stars 23 forks source link

status-line.conf enabled seems to have no effect #19

Closed bearcatsandor closed 3 years ago

bearcatsandor commented 3 years ago

In status-line.conf, changing "enabled=yes to "enabled=no" or 'enabled=false" seem to have no effect. The rest of the parameters such as the font size do have an effect when changed. I'd like the status line to be off by default.

Thank you for making mpv even more awesome.

occivink commented 3 years ago

Mmh it seems to work for me, and I can't see anything wrong with the code. Could you make sure you're using the latest version of the script?

bearcatsandor commented 3 years ago

I pulled them straight from the git repo a few hours before I opened this issue.
I know that key is being read, because if I change that line to 'enabled=foobar' I get [status_line] script-opts/status_line.conf:2 error converting value 'foobar' for key 'enabled' So apparently 'no' and 'false' don't generate that warning, but the status line still shows. My config:

# whether to show by default
enabled=false
# its font size
size=24
# distance of the text to the borders
margin=10
# the text to be expanded
# see property expansion: https://mpv.io/manual/master/#property-expansion
# \N can be used for line breaks
# you can also use ass tags, see here: http://docs.aegisub.org/3.2/ASS_Tags/
text_top_left=
text_top_right=
text_bottom_left=${filename} [${playlist-pos-1}/${playlist-count}]
text_bottom_right=[${dwidth:X}x${dheight:X}]
occivink commented 3 years ago

enabled=no is indeed the correct mpv syntax, using false should produce an error like [status_line] Error: Can't convert false to boolean!. Still, you say you tried no as well so I'm not sure what the error is. Does it occur with only this script as well? For example with mpv --no-config --script=status-line.lua ..?

bearcatsandor commented 3 years ago

If i verify that it's set to no, and I run "mpv --no-config --script=~/.config/mpv/scripts/status-line.lua ~/Pictures/screenshots/*" I still see a status line.

occivink commented 3 years ago

Yes actually that case is not too surprising, since the status_line.conf file is likely not read then. What about with mpv --no-config --script=scripts/status-line.lua --script-opts=status_line-enabled=no ..?

If that fails again, please upload a log file, captured with just mpv --log=logfile ~/Pictures/screenshots or some other path

bearcatsandor commented 3 years ago

Ok! That works with the --script-ops option (thanks for the help so far)

occivink commented 3 years ago

Ok, so I imagine there is some configuration issue somewhere, possibly with the path or content of script-opts/status_line.conf. Can you post a log in any case?

bearcatsandor commented 3 years ago

Sure. To reiterate something. If i change size=24 to size=124 I get huge text, so it is reading the file, just ignoring that line

Logfile is attached. mpv.log

occivink commented 3 years ago

It looks like detect-image.lua is doing it (see line 737 of the log), which makes sense if you kept the .conf file in the repo

bearcatsandor commented 3 years ago

arrgh! Thank you! I feel like an idiot. It's all working now.