Discussion:
[Fluxbox-users] How to add battery monitor script to systemtray or toolbar?
Ivan Uemlianin
2015-01-21 14:36:57 UTC
Permalink
Dear All

I am using fluxbox 1.3.5 on FreeBSD 10.1.

I have a little shell script, called batt, that gets battery info
(percentage charge & estimated time left) and echoes it out like, "38%
(3:35)".

I would like to have this displayed in the fluxbox systemtray or toolbar.

- which is the right place?
- is it possible?
- how should it be done?

I can find no documentation on this. I have looked at the fluxbox web
site and the wiki on github.

With thanks and best wishes

Ivan
--
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

***@llaisdy.com
@llaisdy
llaisdy.wordpress.com
github.com/llaisdy
www.linkedin.com/in/ivanuemlianin

festina lente
============================================================
e***@riseup.net
2015-01-21 16:43:43 UTC
Permalink
Post by Ivan Uemlianin
I have a little shell script, called batt, that gets battery info
(percentage charge & estimated time left) and echoes it out like,
"38% (3:35)".
I would like to have this displayed in the fluxbox systemtray or toolbar.
- which is the right place?
- is it possible?
- how should it be done?
I'm not familiar with freebsd. But in slackware (linux) i use kdocker
to reduce to the systray "arm" (a cli utility to control tor).

The cmd looks like this:

---
xterm -title TorControl -e "sudo -u tor arm -c ~/.arm/armrc" &
kdocker -i /usr/share/pixmaps/onion.png -n TorControl
---

May be there are other utilities too to reduce apps to the systray ...
(?)
Eric S Fraga
2015-01-22 07:10:30 UTC
Permalink
Alternatively, you could use Conky to place the information anywhere on
the screen... this is what I do.
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 24.3.50.1 + Ma Gnus v0.12 + evil-git-87b61e7
: BBDB version 3.1.2 (2014-05-15 10:06:09 -0500)
Ivan Uemlianin
2015-01-22 10:20:29 UTC
Permalink
Thanks both!

Those both sound worth a try. However, they both seem a bit heavyweight.

Is there no way to do what I actually want to do? (I've been using dwm
for a while and the status bar was essentially just a shell script).

Best wishes

Ivan
Post by Eric S Fraga
Alternatively, you could use Conky to place the information anywhere on
the screen... this is what I do.
--
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

***@llaisdy.com
@llaisdy
llaisdy.wordpress.com
github.com/llaisdy
www.linkedin.com/in/ivanuemlianin

festina lente
============================================================
Nable
2015-01-22 11:36:49 UTC
Permalink
Post by Ivan Uemlianin
Those both sound worth a try. However, they both seem a bit heavyweight.
Is there no way to do what I actually want to do? (I've been using dwm
for a while and the status bar was essentially just a shell script).
It looks like there's fixed list of tools that can be added via Fluxbox's
'session.screen0.toolbar.tools' configuration option and showing
the output of shell script isn't among them (patches?).

Next idea is about putting something into systemtray.
If icon with tooltip suits you, then you can try `yad' tool, see here:
http://stackoverflow.com/questions/20344674/bash-tool-to-put-an-icon-on-taskbar

If you need text that is always shown, there are rather simple solutions
using pygtk, e.g.: http://ubuntuforums.org/archive/index.php/t-157545.html
http://stackoverflow.com/questions/4708583/text-overlay-for-tray-icon
Michael M. Tung
2015-01-22 11:55:42 UTC
Permalink
Hi!

To add a program to the Fluxbox systemtray I use alltray:

https://launchpad.net/alltray/+announcements
http://alltray.trausch.us/ (main site currently down)

Highly recommendable. E.g. to run Telegram in Fluxbox one
can use in the .initrc

alltray -H -C -- /usr/local/bin/Telegram &

Best,
Mike
Post by Nable
Post by Ivan Uemlianin
Those both sound worth a try. However, they both seem a bit heavyweight.
Is there no way to do what I actually want to do? (I've been using dwm
for a while and the status bar was essentially just a shell script).
It looks like there's fixed list of tools that can be added via Fluxbox's
'session.screen0.toolbar.tools' configuration option and showing
the output of shell script isn't among them (patches?).
Next idea is about putting something into systemtray.
http://stackoverflow.com/questions/20344674/bash-tool-to-put-an-icon-on-taskbar
If you need text that is always shown, there are rather simple solutions
using pygtk, e.g.: http://ubuntuforums.org/archive/index.php/t-157545.html
http://stackoverflow.com/questions/4708583/text-overlay-for-tray-icon
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Fluxbox-users mailing list
https://lists.sourceforge.net/lists/listinfo/fluxbox-users
--
-------------------------------------------------------------------------
Michael M. Tung Email: ***@mat.upv.es
Departamento de Matemática Aplicada ***@gmail.com
Universidad Politécnica de Valencia Phone: +34 96 38-79557 (IMM)
Inst. de Matemática Multidisciplinar +34 96 38-79777 (Teleco)
Edificio 8-G, 2º piso IM: ICQ96423950
Camino de Vera, s/n
46022 Valencia (Spain)
-------------------------------------------------------------------------
PGP PubKey http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9920E3BA
-------------------------------------------------------------------------
Ivan Uemlianin
2015-01-22 12:42:19 UTC
Permalink
Dear All

Thanks for all these ideas! I'll try a few things out and report back.

Best wishes

Ivan
Post by Michael M. Tung
Hi!
https://launchpad.net/alltray/+announcements
http://alltray.trausch.us/ (main site currently down)
Highly recommendable. E.g. to run Telegram in Fluxbox one
can use in the .initrc
alltray -H -C -- /usr/local/bin/Telegram &
Best,
Mike
Post by Nable
Post by Ivan Uemlianin
Those both sound worth a try. However, they both seem a bit heavyweight.
Is there no way to do what I actually want to do? (I've been using dwm
for a while and the status bar was essentially just a shell script).
It looks like there's fixed list of tools that can be added via Fluxbox's
'session.screen0.toolbar.tools' configuration option and showing
the output of shell script isn't among them (patches?).
Next idea is about putting something into systemtray.
http://stackoverflow.com/questions/20344674/bash-tool-to-put-an-icon-on-taskbar
If you need text that is always shown, there are rather simple solutions
using pygtk, e.g.: http://ubuntuforums.org/archive/index.php/t-157545.html
http://stackoverflow.com/questions/4708583/text-overlay-for-tray-icon
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Fluxbox-users mailing list
https://lists.sourceforge.net/lists/listinfo/fluxbox-users
--
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

***@llaisdy.com
@llaisdy
llaisdy.wordpress.com
github.com/llaisdy
www.linkedin.com/in/ivanuemlianin

festina lente
============================================================
emak
2015-01-22 11:42:54 UTC
Permalink
Post by Ivan Uemlianin
Thanks both!
Those both sound worth a try. However, they both seem a bit heavyweight.
Is there no way to do what I actually want to do? (I've been using dwm
for a while and the status bar was essentially just a shell script).
Best wishes
Ivan
Post by Eric S Fraga
Alternatively, you could use Conky to place the information anywhere on
the screen... this is what I do.
For simplicity I just use xosd. This is my setting in ~/.fluxbox/keys
which can be adapted to meet your needs:
Mod4 b :Exec /usr/bin/acpi | cut -d ":" -f 2 | cut -d
"," -f 1,2 | osd_cat --align=right --pos=bottom --offset=-110
--indent=130 --colour=yellow --delay=3 -f "-*-dejavu
sans-medium-r-*-*-*-*-*-*-*-*-*-*"

Cheers
emak
emak
2015-01-22 11:44:11 UTC
Permalink
Post by Ivan Uemlianin
Thanks both!
Those both sound worth a try. However, they both seem a bit heavyweight.
Is there no way to do what I actually want to do? (I've been using dwm
for a while and the status bar was essentially just a shell script).
Best wishes
Ivan
Post by Eric S Fraga
Alternatively, you could use Conky to place the information anywhere on
the screen... this is what I do.
For simplicity I just use xosd. This is my setting in ~/.fluxbox/keys
which can be adapted to meet your needs:
Mod4 b :Exec /usr/bin/acpi | cut -d ":" -f 2 | cut -d
"," -f 1,2 | osd_cat --align=right --pos=bottom --offset=-110
--indent=130 --colour=yellow --delay=3 -f "-*-dejavu
sans-medium-r-*-*-*-*-*-*-*-*-*-*"

Cheers
emak
e***@riseup.net
2015-01-22 13:18:40 UTC
Permalink
Am Thu, 22 Jan 2015 07:10:30 +0000
Post by Eric S Fraga
Alternatively, you could use Conky to place the information anywhere
on the screen... this is what I do.
Yep! Me too ... ;) But the original question was for the systray.

Another way could be to not use the fluxbox built-in panel but tint2
instead which has a battery functionality built in. But: doing so may
be the combo openbox & tint2 would be the more reasonable idea.

Cheers!

Loading...