Commit Graph

237 Commits

Author SHA1 Message Date
Carsten Haitzler f158ffbe93 emit signals for ac on/off explicitly to battery gad 2021-03-18 11:21:31 +00:00
Carsten Haitzler 09e4f2f8b5 bat popup - match gadget content better 2021-03-14 11:51:58 +00:00
Carsten Haitzler fec75537b6 battery - polish popup list item content 2021-03-13 23:06:35 +00:00
Alastair Poole 5d19ae6a5b battery: missed that.
Bad.
2021-03-11 11:50:56 +00:00
Alastair Poole a6b870266c bat: status entry scroll. 2021-03-09 20:29:31 +00:00
Alastair Poole b593fb0bfa battery: no popup with 0 units. 2021-03-08 13:18:48 +00:00
Alastair Poole c9f1d254ca battery: padding.
enough for now.
2021-03-08 12:49:23 +00:00
Alastair Poole 57d7419a28 battery: fix warning. 2021-03-08 12:35:53 +00:00
Alastair Poole d046bc5268 battery: cleaner popup ui 2021-03-08 12:27:01 +00:00
Alastair Poole 39b7896df5 battery: fix sysctl battery update and naming. 2021-03-07 20:21:12 +00:00
Alastair Poole 1e4eb55816 battery: popup text. 2021-03-07 19:49:40 +00:00
Alastair Poole 9ab00c598b battery: WiP RFC.
How many instances do we need? I'd argue one, or once one poller.
If this is a problem let me know...
2021-03-07 19:18:17 +00:00
Alastair Poole 945697ba0a battery: FreeBSD multiple batteries.
model/vendor/tech support. Some indentation to make the BSD
support easier to read and distinguish. Pleas test.
2021-03-07 16:23:50 +00:00
Alastair Poole a4630c0679 battery: > 1 battery popup. 2021-03-07 12:46:42 +00:00
Carsten Haitzler 5a97e2c4e7 battery - dont show low battery alert if we have >= 15% battery
saves edge cases creating warnings;
2020-12-02 23:04:58 +00:00
Alastair Poole 16bb8e7bd7 battery: Add Rudimentary Popup.
Add a popup for battery. It will update if left visible. The popup
avoids polling by using a slightly delayed copy of the battery
state stored in config struct.
2020-08-29 16:20:54 +01:00
Daniel Zaoui 49459b6b72 Battery: fix the battery status when some battery devices are not valid
It happens that some devices are considered as batteries, even if they
cannot be charged or used as a power supply for the laptop.
The ELAN device deals with the touchpad and is a "battery". When looking
at the udev info, it appears that there is no technology present as
well as the basic battery info (energy levels).

P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN24CC:00/0018:04F3:24CC.0003/power_supply/hid-0018:04F3:24CC.0003-battery
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN24CC:00/0018:04F3:24CC.0003/power_supply/hid-0018:04F3:24CC.0003-battery
E: POWER_SUPPLY_CAPACITY=1
E: POWER_SUPPLY_MODEL_NAME=ELAN24CC:00 04F3:24CC
E: POWER_SUPPLY_NAME=hid-0018:04F3:24CC.0003-battery
E: POWER_SUPPLY_ONLINE=1
E: POWER_SUPPLY_PRESENT=1
E: POWER_SUPPLY_SCOPE=Device
E: POWER_SUPPLY_STATUS=Discharging
E: SUBSYSTEM=power_supply

The issue with that kind of devices is that it confuses the battery
gadget. Since two batteries are present, the total capacity is divided
by 2, resulting in the gadget displaying only 50% when the battery is
fully charged.
To avoid this, we check that the battery technology is known.

@fix
2018-06-05 00:30:47 +03:00
Carsten Haitzler 929037aaa0 battery modules - actually set ac power flag based on ac presence
this should fix T3649

@fix
2017-10-18 13:32:50 +09:00
Carsten Haitzler 16a702ac73 meson - make modules with helper binaries simpelr to build
this makes modules with a binary helper simpler to build using the
parent module build harness as much as possible. i probably could
simplify this down to a single binary only and it is either setuid or
not... define the deps and flags ... it could be a bit simpler. not
much. i also removed the if's in the build for battery and ifdefs in
src handle it instead (imho simpler to maintain in src). sysinfo still
uses the if's there.
2017-08-11 19:50:48 +09:00
Mike Blumenkrantz 1fe4555d7b remove eeze init/shutdown calls from modules
this is unnecessary and was done with mismatched init/shutdowns in some cases
2017-06-30 10:25:17 -04:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Al Poole b4f3a8da0a Enlightenment: Factor all sysctl battery code for bsd into e_mod_sysctl.c
This commit should now allow battery to support OpenBSD, FreeBSD, Dragonfly BSD, and NetBSD
2016-12-09 11:02:43 -06:00
Mike Blumenkrantz 40ebdb60d4 remove library checks for a number of modules along with useless defines
most of these date back from before efl was a unified tree or enlightenment itself
could be optionally built with things like dbus support
2016-03-11 17:19:32 -05:00
Cedric BAIL 4d30a3bf35 battery: let's finally allow the battery process to rest also when enlightenment die. 2015-08-17 22:30:26 +02:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz 471dcb24cb __UNUSED__ -> EINA_UNUSED
this has been bugging me forever. __UNUSED__ is no longer a valid macro here.
2015-03-18 18:09:09 -04:00
Mike Blumenkrantz 09ec213a31 remove e_util_zone_current_get() usage 2015-03-13 17:58:45 -04:00
Mike Blumenkrantz ed897a231e de-e_comp_get()ify e
mrw I remember how to regex http://i.giphy.com/dC9dujPVeAfIY.gif
2015-03-13 15:12:20 -04:00
Mike Blumenkrantz 99589eb5af remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues:

* keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
2014-11-20 15:26:21 -05:00
Mike Blumenkrantz 290e2369d3 s/sumary/summary/g 2014-07-30 19:18:24 -04:00
Mike Blumenkrantz b471c3ad8d use battery popup for battery popup mouse events
fix T1356
2014-06-25 16:05:26 -04:00
Mike Blumenkrantz 18cc2222f3 remove unnecessary battery check
CID 1039945
2014-04-04 15:04:28 -04:00
Mike Blumenkrantz 8422eea8d0 remove unnecessary battery_config null check
CID 1040140
2014-03-13 12:55:24 -04:00
Carsten Haitzler 2a11dfec63 remove % from battery reading to save space 2014-02-24 03:24:26 +09:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00
discomfitor 48c0777dd1 add battery icon to popup for low power warning to ensure deletion 2013-05-18 19:39:51 +01:00
Chidambar Zinnoury f0eb778f50 e mixer and battery modules: reuse notifications.
SVN revision: 82931
2013-01-17 10:47:53 +00:00
José Roberto de Souza d9955d5739 e: Use internal client notification API
Modules:
 - notification
 - battery
 - mixer

Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 82122
2013-01-03 22:08:24 +00:00
José Roberto de Souza 71fa105fd8 e: Port battery module to upower and edbus
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 81975
2013-01-02 13:14:29 +00:00
Carsten Haitzler 6eae31c107 as part of theme redo.. i get to find all the evil little "didnt
namespace this" stuff... fix namespacing of bat popup with fallback to
old one.



SVN revision: 79958
2012-12-01 04:22:05 +00:00
Mike Blumenkrantz 303a69346a fix crash in battery gadget when deleting a gadget after module has been unloaded (possible if gadget is in edit mode)
SVN revision: 78523
2012-10-26 11:43:07 +00:00
Mike Blumenkrantz 20efd7c8cd revert changes from last month to udev backend, seems to have broken things
probably fixes ticket #1304


SVN revision: 76285
2012-09-07 08:01:17 +00:00
Mike Blumenkrantz 2434f5adbe more PATH_MAX cleanups
SVN revision: 75520
2012-08-22 07:32:12 +00:00
Mike Blumenkrantz 94e2fc5257 clean up gadget right click menus to stop leaking
SVN revision: 75285
2012-08-15 07:22:04 +00:00
Mike Blumenkrantz 84126d9ffd use ac presence to indicate battery charging
SVN revision: 75209
2012-08-13 13:14:44 +00:00
Mike Blumenkrantz 5029b27458 battery gadget right click menu now also contains powermanagement option
SVN revision: 75197
2012-08-13 09:31:20 +00:00
Mike Blumenkrantz 82fcf900bd formatting
SVN revision: 75196
2012-08-13 09:24:51 +00:00
Mike Blumenkrantz 98601e4198 sed -i 's/(E_Gadcon_Client_Class/(const E_Gadcon_Client_Class/g'
SVN revision: 74474
2012-07-27 08:25:22 +00:00
Mike Blumenkrantz 74edef9f46 fix memory leak spotted by seb in gc_id_new. this whole thing is pretty confusing; I'm glad we don't have docs for it
SVN revision: 72689
2012-06-22 07:21:51 +00:00
Mike Blumenkrantz 7dbd2e8de9 fix the same instance id bug as in pager, this will likely delete configs for a large number of modules
SVN revision: 72592
2012-06-21 11:03:50 +00:00