zsh-users
 help / color / mirror / code / Atom feed
* How to add battery status on extreme right of zsh prompt
@ 2016-12-27 23:16 shirish शिरीष
  2016-12-28  0:07 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: shirish शिरीष @ 2016-12-27 23:16 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

Hi all,

I am using bigfade theme as can be seen in the attachment. Now I want
to add to have a somewhat fancy battery status on the extreme right of
the zsh prompt.

Exactly what Steve Losch did
http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/

http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity

but for Debian GNU/Linux instead of Mac which he did.

It was tackled in a stackoverflow question as well -

http://stackoverflow.com/questions/16125498/how-to-show-battery-status-in-zsh-prompt/

One of the answers is exactly what I want/need -

http://stackoverflow.com/a/34913418/3597669

There are just two issues -

a. The prompt as shared by the answerer is on the left,  I need it to
be on the extreme right next to my Prompt

b. The whole funciton bit is supposed to lie in .zshrc . I want it to
be in a self-contained .zsh or .sh file which I can source into source
into .zshrc .

I am sure this has been tackled as there are  thousands of dotfiles in
github of which some might have got the answer, neither do I have the
skills or patience to go through them.

I did discover that RPROMPT= is used for anything I want to appear in right.

Look forward to an answer.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
EB80 462B 08E1 A0DE A73A  2C2F 9F3D C7A4 E1C4 D2D8

[-- Attachment #2: correct-prompt.png --]
[-- Type: image/png, Size: 44185 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to add battery status on extreme right of zsh prompt
  2016-12-27 23:16 How to add battery status on extreme right of zsh prompt shirish शिरीष
@ 2016-12-28  0:07 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-12-28  0:07 UTC (permalink / raw)
  To: shirish शिरीष; +Cc: zsh-users

On Tue, Dec 27, 2016 at 3:16 PM, shirish शिरीष <shirishag75@gmail.com> wrote:
>
> I am sure this has been tackled as there are  thousands of dotfiles in
> github of which some might have got the answer, neither do I have the
> skills or patience to go through them.

https://github.com/search?utf8=%E2%9C%93&q=zsh+battery+status&ref=simplesearch

The very first result is about putting the battery status in the RPROMPT.

The third result has code for Linux and Darwin, though it displays the
battery as a numeric percentage rather than a graph.  Also it won't
work at all (will probably throw errors) on e.g. a desktop that
doesn't have a battery in the first place.

Drop "status" from the search and it finds several more including an
oh-my-zsh plugin.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-28  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 23:16 How to add battery status on extreme right of zsh prompt shirish शिरीष
2016-12-28  0:07 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).