mortdeus / wmii

Automatically exported from code.google.com/p/wmii
MIT License
0 stars 0 forks source link

parsing of the new bar syntax seems buggy #211

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I believe that parsing of the new bar syntax is buggy. Steps:
1. Create bar item 'x':
   echo|wmiir create /lbar/x
2. 'write' silently fails to set a label when using space as a separator:
   echo "colors #ffffff #000000 #000000 label 1."|wmiir write /lbar/x
3. Though it works with "\n":
   echo "colors #ffffff #000000 #000000\nlabel 2."|wmiir write /lbar/x
4. 'xwrite' seems to be broken; fails with "bad color string":
   wmiir xwrite /lbar/x "colors #ffffff #000000 #000000\nlabel 3."
5. Fails silently:
   wmiir xwrite /lbar/x "colors #ffffff #000000 #000000 label 4."

What version of the product are you using (wmii -v)? On what operating
system (uname -a)?
  wmii-hg2770

Original issue reported on code.google.com by rogu...@gmail.com on 26 Jul 2010 at 10:01

GoogleCodeExporter commented 9 years ago
#2 and #5 are certainly wrong. They should fail if there are extra characters 
at the end. #4 is correct. xwrite does not process escape sequences (and isn't 
meant to), so you wind up with a color called '#000000\nlabel', which is, of 
course, invalid.

Original comment by maglion...@gmail.com on 26 Jul 2010 at 10:49

GoogleCodeExporter commented 9 years ago
Sorry, looks like I forgot to think. The wmii(1) manual says:
"The files may be read or written to obtain or alter the colors and text of the 
bars. The format is similar to the various ctl files and should be self 
explanitory."

And it is self explanatory indeed: I never tried either of my wrong syntaxes on 
/ctl...  But the manual could mention the new commands:
"The files may be read or written to obtain or alter the colors and text of the 
bars. To alter the colors and the text, the commands 'colors' and 'label' may 
be used. The syntax is similar to the various ctl files."

Original comment by rogu...@gmail.com on 27 Jul 2010 at 10:01

GoogleCodeExporter commented 9 years ago
Categorizing this issue as documentation enhancement.

Original comment by sun...@gmail.com on 22 Feb 2011 at 9:21

GoogleCodeExporter commented 9 years ago

Original comment by sun...@gmail.com on 19 Sep 2011 at 10:39

GoogleCodeExporter commented 9 years ago
I'll handle this one.

Original comment by sun...@gmail.com on 21 Sep 2011 at 12:32