-2

I have iTerm (with zsh) and it looks like: enter image description here

And when I tap Enter: enter image description here

I want pin info about battery on the top of terminal, is it possible?

msw
  • 42,753
  • 9
  • 87
  • 112
Max Lipsky
  • 1,774
  • 1
  • 18
  • 29
  • This isn't "pinned to the top of your terminal" it is a complicated zsh shell prompt string which is why it appears before each command line. – msw Aug 22 '15 at 20:11
  • Probably, it was necessary to ask the question differently. I want to pin one line on the top, but I don't know how. – Max Lipsky Aug 22 '15 at 20:31
  • You probably want to remove the battery indicator from `PS1` and put it in `RPS1` instead, along with some ANSI escape codes in `RPS1` to position the cursor before displaying it. – chepner Aug 24 '15 at 13:50

2 Answers2

1

You could use Tmux to pin a battery indicator. Tmux is not part of Zsh or iTerm, but a pretty light-weight tool that is also useful for other things like window/pane management.

Micah Elliott
  • 9,600
  • 5
  • 51
  • 54
0

Solution with tmux:

  1. Install brew install tmux
  2. Add to ~/.tmux.conf: set -g status-position top
  3. Load config: tmux source-file ~/.tmux.conf
  4. Run tmux

Now you can add any information to top line using tmux config.

Max Lipsky
  • 1,774
  • 1
  • 18
  • 29