diff options
author | wm4 <wm4@nowhere> | 2020-05-25 20:37:37 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-05-25 20:39:37 +0200 |
commit | b1d16a2300c99fd6bf847b6b3374280f9aafa87d (patch) | |
tree | 8fcddcfbd8a03f25d462a437fd32edd5b610a4ab /options | |
parent | b83bdd1d17cc90b4d8cd2a32321cd7c5cc306422 (diff) | |
download | mpv-b1d16a2300c99fd6bf847b6b3374280f9aafa87d.tar.bz2 mpv-b1d16a2300c99fd6bf847b6b3374280f9aafa87d.tar.xz |
player: add --term-title option
This simply printf()s a concatenation of the provided string and the
relevant escape sequences. No idea what exactly defines this escape
sequence (is it just a xterm thing that is now supported relatively
widely?), and this simply uses information provided on the linked github
issue.
Not much of an advantage over --term-status-msg, though at least this
can have a lower update frequency. Also I may consider setting a default
value, and then it shouldn't conflict with the status message.
Fixes: #1725
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 1 | ||||
-rw-r--r-- | options/options.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c index 0194ebed08..22ae8e77e5 100644 --- a/options/options.c +++ b/options/options.c @@ -702,6 +702,7 @@ static const m_option_t mp_opts[] = { {"term-osd-bar", OPT_FLAG(term_osd_bar), .flags = UPDATE_OSD}, {"term-osd-bar-chars", OPT_STRING(term_osd_bar_chars), .flags = UPDATE_OSD}, + {"term-title", OPT_STRING(term_title), .flags = UPDATE_OSD}, {"term-playing-msg", OPT_STRING(playing_msg)}, {"osd-playing-msg", OPT_STRING(osd_playing_msg)}, diff --git a/options/options.h b/options/options.h index ce94d766a7..92e0d7c129 100644 --- a/options/options.h +++ b/options/options.h @@ -217,6 +217,7 @@ typedef struct MPOpts { int term_osd; int term_osd_bar; char *term_osd_bar_chars; + char *term_title; char *playing_msg; char *osd_playing_msg; char *status_msg; |