Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpbattstat in system tray (trayer) #1

Open
tpapp opened this issue Oct 11, 2013 · 6 comments
Open

tpbattstat in system tray (trayer) #1

tpapp opened this issue Oct 11, 2013 · 6 comments

Comments

@tpapp
Copy link

tpapp commented Oct 11, 2013

Hi, I am trying to use tpbattstat with a desktop setup that relies on xmonad, xmobar, and trayer. Is there a way to get the applet to show up in the system tray (provided by trayer?)

@teleshoes
Copy link
Owner

nope, sorry. you could maybe write a widget for xmobar or trayer using the JSON output of tpbattstat.
i wrote a widget for taffybar, which is what i use {along with xmonad}. it serves as my bar and as my system tray.

p.s.: ive never used trayer; if its really easy to stick a thingie in there, i could maybe add support for it.

wolke:~$ tpbattstat -j
{"image": "/usr/share/pixmaps/tpbattstat-applet//png/36x36/idle/100.png", "label": "@@|X \n0.0W ", "click": "/home/wolke/bin/tpbattstat --prefs"}

@tpapp
Copy link
Author

tpapp commented Oct 14, 2013

Can you please put the code for the taffybar widget in the repo (eg in a contrib directory)?

@teleshoes
Copy link
Owner

unfortunately, my taffybar widget is just something i wrote and use, not a package i maintain. i dont have the time to maintain it in a useful fashion.

anyway, here is the code for it:

my generic json-to-gtk taffybar widget:
https://github.com/teleshoes/wolke-home-config/blob/master/.config/taffybar/lib/JsonWidget.hs

json-widget wrapper for tpbattstat:
https://github.com/teleshoes/wolke-home-config/blob/master/.config/taffybar/lib/TPBattStat.hs

deps:
https://github.com/teleshoes/wolke-home-config/blob/master/.config/taffybar/lib/Clickable.hs
https://github.com/teleshoes/wolke-home-config/blob/master/.config/taffybar/lib/Utils.hs

it also may or may not depend on my own fork of taffybar, i forget. my fork of taffybar:
https://github.com/teleshoes/taffybar

@tpapp
Copy link
Author

tpapp commented Oct 14, 2013

Thanks. If I don't want the GUI, just the functionality (especially battery balancing), is it possible to run the application in the background, eg with a cron job? Which .py file should I use for this?

I just need battery balancing on my T430s. Am I correct in assuming that tpbattstat makes battery balancing possible on Ivy Bridge Thinkpads?

@teleshoes
Copy link
Owner

while you can run "tpbattstat.py -j > /dev/null &", it wont work on ivy bridge because tpbattstat still uses smapi for balancing.
what should work is using tpacpi-bat directly {used to live in tpbattstat, now lives in its own repo}

take a look at the tpacpi-bat repo. note that T430s isnt a known-supported model; it would be great if you could test it out and add it to the list of models in tpacpi-bat and pull-request it.

@teleshoes
Copy link
Owner

i have now added tpacpi to tpbattstat. you need to install tpacpi-bat first, and run tpbattstat.py -j as root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants