I will look into the UTF table. I am not using UTF8, nor was I planning on it. The characters were indeed something else before I modified the font, so I made them myself. In order to print the two character wide wifi bar, the script of course prints two seperate characters one after another followed by a newline. The battery script does likewise by printing 3 characters. My terminal does not have the abillity to turn one character into two (at least that i am aware of). My terminal always handles the scripts as expected when run as a command from the terminal. The only issues I have had with them, or the modified characters and font is when they are used on the tmux statusbar.
--- On Tue, 11/6/12, Nicholas Marriott <nicholas.marri...@gmail.com> wrote: > From: Nicholas Marriott <nicholas.marri...@gmail.com> > Subject: Re: Tmux: echos to the status bar > To: "ian m" <ianisthewal...@yahoo.com> > Cc: "Adrian Luff" <adr...@luff.me>, "tmux-users@lists.sourceforge.net" > <tmux-users@lists.sourceforge.net> > Date: Tuesday, November 6, 2012, 11:07 PM > Where did you get these characters > from? > > 0xc398 is UTF-8 'LATIN CAPITAL LETTER O WITH STROKE' > http://www.fileformat.info/info/unicode/char/d8/index.htm > 0xc399 is UTF-8 'LATIN CAPITAL LETTER U WITH GRAVE' > http://www.fileformat.info/info/unicode/char/d9/index.htm > > Both of these are one character in width, so if your > terminal makes them > something else that is two characters wide then tmux will > not be able to > draw the status line correctly. You'll have to hack the > table in utf8.c > to tell it they are two characters wide (and make sure UTF-8 > is properly > enabled in tmux of course). > > > > On Tue, Nov 06, 2012 at 01:40:31PM -0800, ian m wrote: > > I am printing the characters for the icons > via scripts in the status > > right. in the status left, the icons are > static, and thus can simply be > > pasted into the string. that causes no > glitch. The wifi icon is two > > characters, and the battery icon is three. > resulting in 5 glitched > > characters at the end of my statusbar. I > have busybox, so my cat version > > unfortunately does not support the > -v switch. > > > > both scripts basically work like this: > > #!/bin/sh > > value = `/some/numeric/script` > > if [ blablabal ]; then > > printf '\xc3\x98' > > elif [ blablabla ]; then > > printf '\xc3\x99' > > ...... etc. > > printf '\n' > > EOF > > thus building each icon by parsing the > numeric value of a script and > > outputting the appropriate characters, > followed by a newline. > > > > I have tried replacing the print calls > with echo -ne calls and replacing > > the hex values with hex calls to the acs, > with octal calls, and with > > simply pasting the characters in (copy and > paste support provided by tmux > > of course). All methods result in this > glitch. > > > > > -------------------------------------------------------------------------- > > > > From: Nicholas Marriott <nicholas.marri...@gmail.com> > > To: ian m <ianisthewal...@yahoo.com> > > Cc: Adrian Luff <adr...@luff.me>; > "tmux-users@lists.sourceforge.net" > > <tmux-users@lists.sourceforge.net> > > Sent: Tuesday, November 6, 2012 5:30 AM > > Subject: Re: Tmux: echos to the status > bar > > In-Reply-To: > > <[1]1352169473.5476.yahoomail...@web142502.mail.bf1.yahoo.com> > > > > Tell us what you are printing. What do you > see when you send the output > > of your script through "cat -v" from the > shell? > > > > On Mon, Nov 05, 2012 at 06:37:53PM -0800, > ian m wrote: > > > Yes you are correct. the > 2nd colon and the 4 0s are all glitched > > text. > > > When tmux was started it > happened 5:00, so thats what the glitched > > text > > > was. sorry it is rather > unclear. the time is simply "%l:%M in my > > > .tmux.conf > > > > > > The utf8 underscores > were a result of my terminal not supporting > > utf8, and > > > forcing tmux into > unicode mode. When I used a terminal with unicode > > > support (or atleast told > my terminal to. I set TERM to rxvt-unicode), > > then > > > all my characters were > displayed again, and the glitches came back > > and > > > look exactly like the > original. > > > > > > I already have standard > numeric scripts for both utilities, and > > simply > > > parse there output to > create the icon characters. You can see from > > the > > > screenshots how tiny the > terminal is, so it is a much more economical > > use > > > of the space (and looks > better and is easier to read) to use the > > icons, > > > than it would be to use > the numeric output with labels. > > > > > > I am not connecting via > ssh. I have a keyboard, and a monitor. havnt > > > needed a mouse on the > terminal. > > > > > > I have tried simply > echoing (or printf) the hex or octal values of > > the > > > characters, or entering > and exiting the acs to draw the icons, as > > well as > > > just pasting them into > the script directly and echoing that. the > > result is > > > the same: the glitch. > > > > > > Ian > > > > > > > > > -------------------------------------------------------------------------- > > > > > > From: Adrian Luff > <[2]adr...@luff.me> > > > To: ian m <[3]ianisthewal...@yahoo.com> > > > Cc: "[4]tmux-users@lists.sourceforge.net" > > <[5]tmux-users@lists.sourceforge.net> > > > Sent: Monday, November > 5, 2012 6:49 PM > > > Subject: Re: Tmux: echos > to the status bar > > > So in the "standard > glitch" picture, what's the actual issue? What > > should > > > status-right show? I'm > guessing the 4 extra zeros in the time aren't > > > desired but***? > > > The changes you observed > with UTF-8 suggest that perhaps whatever > > you're > > > using to insert the > signal and battery glyphs (your script?) isn't > > > escaping the output > correctly, leaving data tmux is trying to > > interpret. > > > These are mapping to > gibberish in non-UTF-8 mode and invalid Unicode > > in > > > UTF-8 mode (hence the > underscores). > > > Check out [1]this script > for a text-only tmux battery status script. > > No > > > suggestions for a wifi > signal strength script unfortunately. > > > Regarding the > terminal*** are you connecting to the system running > > wrt > > > using ssh? Connecting > over serial from a laptop? Connecting your > > keyboard > > > & mouse directly to > the wrt box? The reason I ask is that if you're > > > connecting with putty or > another terminal emulator the terminal > > settings > > > (particularly UTF-8 and > font settings) could be a factor. I don't > > think > > > so, given the above > information though. > > > -Adrian > > > On Nov 5, 2012, at 3:07 > PM, ian m <[2][6]ianisthewal...@yahoo.com> > > wrote: > > > > > > I attempted the > enabling UTF8, and I thought it actually solved the > > > issue of not > displaying the glitched characters, but simply because > > > replaces all my > echoed characters as underscores. Once I set TERM > > to a > > > unicode enabled > terminal, everything displayed correctly again, and > > the > > > glitches came > right back. see below. I am running Linux, the > > openWRT/> > > distro to be precise on an embedded system. As > for the terminal, I > > am > > > not entirely > sure. They are all virtual ttys I suppose. I have > > terminfo > > > for rxvt, xterm, > rxvt-unicode, xterm-color, linux,dumb, vt100, > > vt102, > > > and ansi. I am > not sure how rxvt or xterm are applicable, because I > > do > > > not have X. If I > had to venture a guess, it is probably FBterm, > > > > > > Thanks again. > > > > > > standard glitch: > [3][7]http://i.imgur.com/wQsJ1.png > > > after a status > bar enable + disable cycle: > > > [4][8]http://i.imgur.com/fQ11i.png > > > with unicode > turned on in .tmux.conf: > > > [5][9]http://imgur.com/wQsJ1,fQ11i,VDZPg#2 > > > > > > > > > -------------------------------------------------------------------------- > > > > > > From: Adrian Luff > <[6][10]adr...@luff.me> > > > To: ian m > <[7][11]ianisthewal...@yahoo.com> > > > Cc: "[8][12]tmux-users@lists.sourceforge.net" > > > <[9][13]tmux-users@lists.sourceforge.net> > > > Sent: Monday, > November 5, 2012 2:31 PM > > > Subject: Re: > Tmux: echos to the status bar > > > Could be UTF-8 > characters being sent from your script without UTF-8 > > > being turned on. > Try adding the following to you .tmux.conf: > > > > > > # Treat > top-bit-set-option characters in the status-left and > > > > status-right strings as UTF-8 > > > > > > set-option > -g status-utf8 on > > > > > > The only other > thing that comes to mind is something terminal / os > > > specific. What > are you using? > > > Also, a screen > shot might be helpful. > > > -Adrian > > > On Nov 5, 2012, > at 10:41 AM, ian m > > <[10][14]ianisthewal...@yahoo.com> > wrote: > > > > > > Thank you > for your response. > > > I am not > using: > > > set -g > status-right "text" > > > that works > as expected. > > > I have > tried: > > > set -g > status-right '#( echo "text" )' > > > this is > what causes the issues. A simple case like this can > > easily be > > > fixed by > using the first method, but I am using something like > > this to > > > get > dynamic information: > > > set -g > status-right '#( /call/my/script )' > > > > > > > ##/call/my/script## > > > #!/bin/sh > > > if [blah > blah]; then > > > echo > "this" > > > else > > > echo > "that" > > > using > printf instead of echo does not fix the problems with the > > > glitching. > also, my clock is already the rightmost thing i > > specify in > > > the > status. the garbled text is always added on beyond that > > regardless > > > of what is > there. > > > > > > > > > -------------------------------------------------------------------------- > > > > > > From: > Adrian Luff <[11][15]adr...@luff.me> > > > To: ian m > <[12][16]ianisthewal...@yahoo.com> > > > Cc: > "[13][17]tmux-users@lists.sourceforge.net" > > > > <[14][18]tmux-users@lists.sourceforge.net> > > > Sent: > Sunday, November 4, 2012 11:23 PM > > > Subject: > Re: Tmux: echos to the status bar > > > Ian, > > > Are you > echoing using a simple text string*** > > > > > > set > -g status-right "text" > > > > > > ***a > system call... > > > > > > set > -g status-right '#( echo "text" )' > > > > > > ***or a > terminal echo string*** > > > > > > > $printf "\033]2;text\033\\" > > > > > > ...or > perhaps something else? > > > I recall > seeing something like this issue when updating elements > > flush > > > to the > right edge of the screen. I think I just rearranged the > > > elements > of the statusbar to keep the clock (with timezone) > > always on > > > the > right. > > > > > > > set-option -g status-right " > > > > #[fg=cyan]#36T#[fg=colour238]|#[fg=yellow]%H:%M:%S %a %d-%b > %Z" > > > > > > -Adrian > > > On Nov 4, > 2012, at 7:53 PM, ian m > > <[15][19]ianisthewal...@yahoo.com> > > > wrote: > > > > > > > Hello, > > > > > > For > my tmux statusbar, I call some scripts to echo some text to > > the > > > > status right. This however results in some glitched text to > the > > far > > > > right side of the statusbar. For each character that is > echoed, > > I > > > get > an extra glitched character on the statusbar. The character > > > > seems to be whatever was previously ocupying that character > > before. > > > It > is usually my clock, so I will get for example 4:2424 if I > > echo > > > two > characters. If I disable the statusbar, and reenable it, > > the > > > > characters are just orange from the tmux comandline. > Attempting > > to > > > > limit the length of the status right only limits the real > > > > characters. The glitches are still tacked on the end > > afterwards. > > > > > > Why > is this happening, and how can I prevent this from > > occurring? > > > > Thanks for any help! > > > > > > > Ian > > > > > > > > > ------------------------------------------------------------------------------ > > > > LogMeIn Central: Instant, anywhere, Remote PC access and > > management. > > > > Stay in control, update software, and manage PCs from one > > command > > > > center > > > > Diagnose problems and improve visibility into emerging IT > > issues > > > > Automate, monitor and manage. Do more in less time with > Central > > > > [16][20]http://p.sf.net/sfu/logmein12331_d2d > > > > _______________________________________________ > > > > tmux-users mailing list > > > > [17][21]tmux-users@lists.sourceforge.net > > > > [18][22]https://lists.sourceforge.net/lists/listinfo/tmux-users > > > > > > References > > > > > > Visible links > > > 1. [23]https://raw.github.com/richo/battery/master/bin/battery > > > 2. mailto:[24]ianisthewal...@yahoo.com > > > 3. [25]http://i.imgur.com/wQsJ1.png > > > 4. [26]http://i.imgur.com/fQ11i.png > > > 5. [27]http://imgur.com/wQsJ1,fQ11i,VDZPg#2 > > > 6. mailto:[28]adr...@luff.me > > > 7. mailto:[29]ianisthewal...@yahoo.com > > > 8. mailto:[30]tmux-users@lists.sourceforge.net > > > 9. mailto:[31]tmux-users@lists.sourceforge.net > > > 10. mailto:[32]ianisthewal...@yahoo.com > > > 11. mailto:[33]adr...@luff.me > > > 12. mailto:[34]ianisthewal...@yahoo.com > > > 13. mailto:[35]tmux-users@lists.sourceforge.net > > > 14. mailto:[36]tmux-users@lists.sourceforge.net > > > 15. mailto:[37]ianisthewal...@yahoo.com > > > 16. [38]http://p.sf.net/sfu/logmein12331_d2d > > > 17. mailto:[39]tmux-users@lists.sourceforge.net > > > 18. [40]https://lists.sourceforge.net/lists/listinfo/tmux-users > > > > > > > > ------------------------------------------------------------------------------ > > > LogMeIn Central: Instant, anywhere, > Remote PC access and management. > > > Stay in control, update software, and > manage PCs from one command center > > > Diagnose problems and improve > visibility into emerging IT issues > > > Automate, monitor and manage. Do more > in less time with Central > > > [41]http://p.sf.net/sfu/logmein12331_d2d > > > > > > _______________________________________________ > > > tmux-users mailing list > > > [42]tmux-users@lists.sourceforge.net > > > [43]https://lists.sourceforge.net/lists/listinfo/tmux-users > > > > References > > > > Visible links > > 1. mailto:1352169473.5476.yahoomail...@web142502.mail.bf1.yahoo.com > > 2. mailto:adr...@luff.me > > 3. mailto:ianisthewal...@yahoo.com > > 4. mailto:tmux-users@lists.sourceforge.net > > 5. mailto:tmux-users@lists.sourceforge.net > > 6. mailto:ianisthewal...@yahoo.com > > 7. http://i.imgur.com/wQsJ1.png > > 8. http://i.imgur.com/fQ11i.png > > 9. http://imgur.com/wQsJ1,fQ11i,VDZPg#2 > >10. mailto:adr...@luff.me > >11. mailto:ianisthewal...@yahoo.com > >12. mailto:tmux-users@lists.sourceforge.net > >13. mailto:tmux-users@lists.sourceforge.net > >14. mailto:ianisthewal...@yahoo.com > >15. mailto:adr...@luff.me > >16. mailto:ianisthewal...@yahoo.com > >17. mailto:tmux-users@lists.sourceforge.net > >18. mailto:tmux-users@lists.sourceforge.net > >19. mailto:ianisthewal...@yahoo.com > >20. http://p.sf.net/sfu/logmein12331_d2d > >21. mailto:tmux-users@lists.sourceforge.net > >22. https://lists.sourceforge.net/lists/listinfo/tmux-users > >23. https://raw.github.com/richo/battery/master/bin/battery > >24. mailto:ianisthewal...@yahoo.com > >25. http://i.imgur.com/wQsJ1.png > >26. http://i.imgur.com/fQ11i.png > >27. http://imgur.com/wQsJ1,fQ11i,VDZPg#2 > >28. mailto:adr...@luff.me > >29. mailto:ianisthewal...@yahoo.com > >30. mailto:tmux-users@lists.sourceforge.net > >31. mailto:tmux-users@lists.sourceforge.net > >32. mailto:ianisthewal...@yahoo.com > >33. mailto:adr...@luff.me > >34. mailto:ianisthewal...@yahoo.com > >35. mailto:tmux-users@lists.sourceforge.net > >36. mailto:tmux-users@lists.sourceforge.net > >37. mailto:ianisthewal...@yahoo.com > >38. http://p.sf.net/sfu/logmein12331_d2d > >39. mailto:tmux-users@lists.sourceforge.net > >40. https://lists.sourceforge.net/lists/listinfo/tmux-users > >41. http://p.sf.net/sfu/logmein12331_d2d > >42. mailto:tmux-users@lists.sourceforge.net > >43. https://lists.sourceforge.net/lists/listinfo/tmux-users > ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users