On Mon, 9 May 2011 14:55:36 +0200 Alexandre Ratchov <a...@caoua.org> wrote:
> On Mon, May 09, 2011 at 02:56:28PM +0300, Sviatoslav Chagaev wrote: > > On Mon, May 9, 2011 at 4:48 AM, Jacob Meuser <jake...@sdf.lonestar.org> > > wrote: > > > On Mon, May 09, 2011 at 01:32:49AM +0300, Sviatoslav Chagaev wrote: > > >> * sorted output looks cleaner, prettier; > > >> * it's easier to find the variable you're looking for in a sorted > > >> output; > > >> * hierarchical variable names yet unordered? doesn't make sense; > > >> * this way mixerctl's behaviour will be closer to other *ctl programs > > >> which output variables in an ordered fashion (audioctl, sysctl, > > >> wsconsctl). > > > > > > these are all matters of opinion, except for "hierarchical variable names" > > > which is not technically the case here. > > > > > > > Okay, but what about making mixerctl more similar to other *ctl? > > > > sysctl is a tree, while the mixer is not a tree. It's not either a > linear bunch of strings. You are talking about how it's implemented. For all I care -- it can have neural networks inside of it. Each next layer of software provides a higher level abstraction. Device specific audio driver -> device independent audio driver -> mixerctl/audioctl. I always thought that the idea behind the *ctl programs is to provide a way to configure totally different things in a similar manner. Therefore *ctl programs should behave as similarily as possible. > > Sorting it doesn't make much sense imho. Furthermore, sorting mixctl > as strings is easy with sort(1) so it's not absolutely necessary; mixerctl is the only *ctl program for which I use "| sort" all the time. > while it would kill the widget order exposed by the driver. > Both you and Jacob Meuser mentioned this, but what is this information useful for? I already can figure out which widgets are related just by looking at the names of the variables. > -- Alexandre Excerpt from mixerctl(1) manpage: ... EXAMPLES Show possible values for all mixer variables, and their current settings: $ mixerctl -av inputs.mic=0,0 volume inputs.mic.mute=off [ off on ] inputs.cd=220,220 volume inputs.cd.mute=off [ off on ] inputs.dac=220,220 volume inputs.dac.mute=off [ off on ] record.record=220,220 volume record.record.source=mic [ mic cd dac ] monitor.monitor=0 volume ... Maybe the original author of mixerctl didn't think of adding sorting because on his computer the output looked more or less ordered.