In-Reply-To: <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 <adr...@luff.me>
>    To: ian m <ianisthewal...@yahoo.com>
>    Cc: "tmux-users@lists.sourceforge.net" <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]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]http://i.imgur.com/wQsJ1.png
>      after a status bar enable + disable cycle:
>      [4]http://i.imgur.com/fQ11i.png
>      with unicode turned on in .tmux.conf:
>      [5]http://imgur.com/wQsJ1,fQ11i,VDZPg#2
> 
>    --------------------------------------------------------------------------
> 
>      From: Adrian Luff <[6]adr...@luff.me>
>      To: ian m <[7]ianisthewal...@yahoo.com>
>      Cc: "[8]tmux-users@lists.sourceforge.net"
>      <[9]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]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]adr...@luff.me>
>        To: ian m <[12]ianisthewal...@yahoo.com>
>        Cc: "[13]tmux-users@lists.sourceforge.net"
>        <[14]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]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]http://p.sf.net/sfu/logmein12331_d2d
>          _______________________________________________
>          tmux-users mailing list
>          [17]tmux-users@lists.sourceforge.net
>          [18]https://lists.sourceforge.net/lists/listinfo/tmux-users
> 
> References
> 
>    Visible links
>    1. https://raw.github.com/richo/battery/master/bin/battery
>    2. mailto:ianisthewal...@yahoo.com
>    3. http://i.imgur.com/wQsJ1.png
>    4. http://i.imgur.com/fQ11i.png
>    5. http://imgur.com/wQsJ1,fQ11i,VDZPg#2
>    6. mailto:adr...@luff.me
>    7. mailto:ianisthewal...@yahoo.com
>    8. mailto:tmux-users@lists.sourceforge.net
>    9. mailto:tmux-users@lists.sourceforge.net
>   10. mailto:ianisthewal...@yahoo.com
>   11. mailto:adr...@luff.me
>   12. mailto:ianisthewal...@yahoo.com
>   13. mailto:tmux-users@lists.sourceforge.net
>   14. mailto:tmux-users@lists.sourceforge.net
>   15. mailto:ianisthewal...@yahoo.com
>   16. http://p.sf.net/sfu/logmein12331_d2d
>   17. mailto:tmux-users@lists.sourceforge.net
>   18. 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


------------------------------------------------------------------------------
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

Reply via email to