Discussion:
[MPlayer-users] Request: name change of command line switch
Thoralf Dassler
2015-06-24 08:54:56 UTC
Permalink
Hi,

I was wondering if the following command line switch can be changed:

-xineramascreen --> -xs (or maybe just add -xs, so there's two switches
doing the same thing?)

The change would be very helpful for users with a multihead environment;
= much less typing.

Thanks,
Thoralf
houghi
2015-06-24 09:29:54 UTC
Permalink
Post by Thoralf Dassler
Hi,
-xineramascreen --> -xs (or maybe just add -xs, so there's two
switches doing the same thing?)
The change would be very helpful for users with a multihead
environment; = much less typing.
Just a FYI if it is decided not to do it, or untill they do, there are
temporary solutions for you.
1) If you use it all the time, use an alias. Even if you don't use it
all the time an almias can come in handy
e.g. mplayerxs could be an alias for 'mplayer -xineramascreen'
2) Write a script that turns the -xs option into -xineramascreen

What I do with most often used commands is to write them into either an
alias or a script. You could do e.g. mpx for 'mplayer -xineramascreen
-one option -anotheroption -option three ...'

That way 'mpx file.avi' will start the file with all the parameters.

If you want toi do different things and check some things, a script
might be a better option.
--
houghi
Thoralf Dassler
2015-06-24 11:48:59 UTC
Permalink
Thanks for the tips, will look into writing a script (got too many
aliases already :) )
T
Post by houghi
Post by Thoralf Dassler
Hi,
-xineramascreen --> -xs (or maybe just add -xs, so there's two
switches doing the same thing?)
The change would be very helpful for users with a multihead
environment; = much less typing.
Just a FYI if it is decided not to do it, or untill they do, there are
temporary solutions for you.
1) If you use it all the time, use an alias. Even if you don't use it
all the time an almias can come in handy
e.g. mplayerxs could be an alias for 'mplayer -xineramascreen'
2) Write a script that turns the -xs option into -xineramascreen
What I do with most often used commands is to write them into either
an alias or a script. You could do e.g. mpx for 'mplayer
-xineramascreen -one option -anotheroption -option three ...'
That way 'mpx file.avi' will start the file with all the parameters.
If you want toi do different things and check some things, a script
might be a better option.
houghi
2015-06-24 17:41:04 UTC
Permalink
Thanks for the tips, will look into writing a script (got too many aliases
already :) )
Some distro's will check if ~/.alias is present and if it is, it will read
it. You can then easily group them by using # as a comment. Here a sample
of my ~/.alias:

# Standard stuff
alias dir='ls -l'
alias ll='ls -l'
alias la='ls -la'
alias l='ls -alF'
alias ls-l='ls -l'

# sudoers stuff
alias smount="sudo mount -o loop"
alias umount="sudo umount"
alias mount="sudo mount"
alias tail="sudo tail"
alias zyp="sudo zypper -n in"
alias nethogs="sudo /usr/sbin/nethogs"
alias fuser="sudo /bin/fuser"

<snip many more lines>

That way it keeps it all nicely together. I believe it is a leftover from
my openSUSE days. I have the following line in ~/.bashrc


if [ -f ~/.alias ]; then
. ~/.alias
fi

Kind regards,

houghi
Thoralf Dassler
2015-06-30 15:16:51 UTC
Permalink
Thanks for this, looks interesting.
Post by Thoralf Dassler
Post by Thoralf Dassler
Thanks for the tips, will look into writing a script (got too many
aliases
Post by Thoralf Dassler
already :) )
Some distro's will check if ~/.alias is present and if it is, it will read
it. You can then easily group them by using # as a comment. Here a sample
# Standard stuff
alias dir='ls -l'
alias ll='ls -l'
alias la='ls -la'
alias l='ls -alF'
alias ls-l='ls -l'
# sudoers stuff
alias smount="sudo mount -o loop"
alias umount="sudo umount"
alias mount="sudo mount"
alias tail="sudo tail"
alias zyp="sudo zypper -n in"
alias nethogs="sudo /usr/sbin/nethogs"
alias fuser="sudo /bin/fuser"
<snip many more lines>
That way it keeps it all nicely together. I believe it is a leftover from
my openSUSE days. I have the following line in ~/.bashrc
if [ -f ~/.alias ]; then
. ~/.alias
fi
Kind regards,
houghi
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Peter White
2015-06-24 15:14:33 UTC
Permalink
Post by Thoralf Dassler
Hi,
-xineramascreen --> -xs (or maybe just add -xs, so there's two switches
doing the same thing?)
The change would be very helpful for users with a multihead environment;
= much less typing.
You could try and see if your shell has TAB-completion for mplayer.
Bash and zsh on Debian certainly have, so I just need to type

$ mplayer -xi<TAB>

which amounts to the exact same number of keystrokes as in your
proposal. ;)

Cheers,
Peter
jd1008
2015-06-24 17:48:12 UTC
Permalink
Post by Thoralf Dassler
Hi,
-xineramascreen --> -xs (or maybe just add -xs, so there's two
switches doing the same thing?)
The change would be very helpful for users with a multihead
environment; = much less typing.
Thanks,
Thoralf
____________
+1
Reimar Döffinger
2015-06-29 20:26:46 UTC
Permalink
Post by Thoralf Dassler
Hi,
-xineramascreen --> -xs (or maybe just add -xs, so there's two switches
doing the same thing?)
The change would be very helpful for users with a multihead environment; =
much less typing.
I do not exactly like the proposed option.
It is not very clear to anyone who doesn't already know it,
and it still references the misleading "xinerama" part while
the option also works on e.g. Windows.
I'd be in favour of -screen or possibly shortened to -scr,
in case you think these are sufficiently shorter...
Thoralf Dassler
2015-06-30 10:49:21 UTC
Permalink
Hi,
Post by Reimar Döffinger
I do not exactly like the proposed option.
It is not very clear to anyone who doesn't already know it, ...
Ok.
Post by Reimar Döffinger
I'd be in favour of -screen or possibly shortened to -scr,
Yes. '-scr' is better than my suggestion.

T
Post by Reimar Döffinger
Post by Thoralf Dassler
Hi,
-xineramascreen --> -xs (or maybe just add -xs, so there's two switches
doing the same thing?)
The change would be very helpful for users with a multihead environment; =
much less typing.
I do not exactly like the proposed option.
It is not very clear to anyone who doesn't already know it,
and it still references the misleading "xinerama" part while
the option also works on e.g. Windows.
I'd be in favour of -screen or possibly shortened to -scr,
in case you think these are sufficiently shorter...
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Reimar Döffinger
2015-07-07 19:26:35 UTC
Permalink
Requested by users to reduce typing.
Also the xineramascreen name is quite bad
as it is valid also on e.g. Windows and thus
the xinerama part simply makes no sense.
---
DOCS/man/en/mplayer.1 | 8 ++++----
cfg-mplayer.h | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index c5d699e..dc888b9 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -3541,8 +3541,8 @@ beyond the top border".
If an external window is specified using the \-wid option, then the x and
y coordinates are relative to the top-left corner of the window rather
than the screen.
-The coordinates are relative to the screen given with \-xineramascreen for
-the video output drivers that fully support \-xineramascreen (direct3d, gl, gl_tiled,
+The coordinates are relative to the screen given with \-scr for
+the video output drivers that fully support \-scr (direct3d, gl, gl_tiled,
vdpau, x11, xv, xvmc, corevideo).
.br
.I NOTE:
@@ -3742,7 +3742,7 @@ panscan, etc are no longer handled by MPlayer but must be managed by the
application that created the window.
.
.TP
-.B \-xineramascreen <\-2\-...>
+.B \-scr <\-2\-...> (alias for \-xineramascreen)
In Xinerama configurations (i.e.\& a single desktop that spans across multiple
displays) this option tells MPlayer which screen to display the movie on.
A value of \-2 means fullscreen across the whole virtual display (in this case
@@ -4129,7 +4129,7 @@ Mac OS X CoreVideo video output driver
.PD 0
.RSs
.IPs device_id=<number>
-DEPRECATED, use \-xineramascreen instead.
+DEPRECATED, use \-scr instead.
Choose the display device to use for fullscreen or set it to \-1 to
always use the same screen the video window is on (default: \-1 \- auto).
.IPs shared_buffer
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 041361a..408881d 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -201,6 +201,7 @@ const m_option_t mplayer_opts[]={
{"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0, 0, 1, NULL},

{"xineramascreen", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},
+ {"scr", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},

{"brightness",&vo_gamma_brightness, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
{"saturation",&vo_gamma_saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
--
2.1.4
Alexander Strasser
2015-07-07 22:16:59 UTC
Permalink
Post by Reimar Döffinger
Requested by users to reduce typing.
Also the xineramascreen name is quite bad
as it is valid also on e.g. Windows and thus
the xinerama part simply makes no sense.
---
DOCS/man/en/mplayer.1 | 8 ++++----
cfg-mplayer.h | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index c5d699e..dc888b9 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -3541,8 +3541,8 @@ beyond the top border".
If an external window is specified using the \-wid option, then the x and
y coordinates are relative to the top-left corner of the window rather
than the screen.
-The coordinates are relative to the screen given with \-xineramascreen for
-the video output drivers that fully support \-xineramascreen (direct3d, gl, gl_tiled,
+The coordinates are relative to the screen given with \-scr for
+the video output drivers that fully support \-scr (direct3d, gl, gl_tiled,
vdpau, x11, xv, xvmc, corevideo).
.br
@@ -3742,7 +3742,7 @@ panscan, etc are no longer handled by MPlayer but must be managed by the
application that created the window.
.
.TP
-.B \-xineramascreen <\-2\-...>
+.B \-scr <\-2\-...> (alias for \-xineramascreen)
IMHO call it -screen or make another alias. The xineramascreen was a
misnomer but scr is not such a widely used abbreviation for screen.
Post by Reimar Döffinger
In Xinerama configurations (i.e.\& a single desktop that spans across multiple
displays) this option tells MPlayer which screen to display the movie on.
A value of \-2 means fullscreen across the whole virtual display (in this case
@@ -4129,7 +4129,7 @@ Mac OS X CoreVideo video output driver
.PD 0
.RSs
.IPs device_id=<number>
-DEPRECATED, use \-xineramascreen instead.
+DEPRECATED, use \-scr instead.
Choose the display device to use for fullscreen or set it to \-1 to
always use the same screen the video window is on (default: \-1 \- auto).
.IPs shared_buffer
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index 041361a..408881d 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -201,6 +201,7 @@ const m_option_t mplayer_opts[]={
{"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0, 0, 1, NULL},
{"xineramascreen", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},
+ {"scr", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},
Could be better aligned too ease error checking. Normally I would
not care, but in this special case I think it is more readable and
easier to check.
Post by Reimar Döffinger
{"brightness",&vo_gamma_brightness, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
{"saturation",&vo_gamma_saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
--
Otherwise LGTM.

Alexander

Loading...