Add 'primary' keyword to mattr.
lwilletts opened this issue · 4 comments
So you can always get the primary screen values regardless of what it is called.
I don't think this would cause any conflicts with display adapter names.
That's actually something that I've wanted to do for a while now.
I just pushed a few changes that implement this behavior in lsm
. You can get the primary monitor (if specified via xrandr
) with the -p
flag.
$ lsm -p
VGA1
In it's current state the, when there's no primary monitor, lsm
just returns empty output.
EDIT:
Come to think of it would an error be more appropriate for a response when there's no primary monitor?
Perhaps so we can do lsm -p || echo "no primary monitor"
What do you think?
Empty output with an error code return is the wmutils way, I would say to stick to that.
Nice catch!
I've fixed the issue and now lsm
returns an error code with the -p
param and no primary monitor specified.