Files
mcde/programs/dtbar/Makefile.am
T
lotherkandClaude Opus 5.5 451aac7fe4 mcde: the battery in the bar
McdeSys gets mcde_sys_battery: all batteries as one, charging, mains,
minutes left.  NetBSD reads the envsys(4) dictionary of /dev/sysmon as
envstat(8) does (acpibat "present", "charge", "charging", "discharge
rate"; acpiacad "connected"), Linux /sys/class/power_supply (energy_* or
charge_*, status, Mains/USB online).  The sources are in
docs/reference/battery.txt.

dtbar shows a fourth icon, only when there is a battery: full, half, low
(red), charging; its menu says the charge, the power source and the time
left.  The status bar is 30 pixels an icon.

Measured: on the Linux host test_sysinfo says "battery 76% ac", as
/sys/class/power_supply/BAT0/capacity and AC/online do; the menu on Xvfb
(build/mcde-shots/battery-menu.png) says "Battery: 76 %", "Power Source:
Power Adapter".  The NetBSD backend compiles and runs in the build VM,
which has no battery (envstat: no drivers registered): only the
no-battery case is measured there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:01:18 +00:00

27 lines
1.2 KiB
Makefile

MAINTAINERCLEANFILES = Makefile.in
# dtbar, MCDE's bar at the top of the screen (dtbar.c, about.c, forcequit.c);
# the menu model it reads is in libDtSvc (DtUtil2/McdeMenuModel.c), what the
# computer is comes from McdeSys. items.c (Favourites, Recent Items) is plain
# C with its own tests (make check).
bin_PROGRAMS = dtbar
dtbar_SOURCES = dtbar.c dtbar.h about.c forcequit.c status.c menuscale.c \
items.c items.h
dtbar_CPPFLAGS = -I$(top_srcdir)/include $(DT_INCDIR) -I$(top_builddir)/include \
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\"
dtbar_LDADD = $(LIBMCDESYS) $(DTCLIENTLIBS) $(XTOOLLIB)
# the icons of the status menus, CDE's kind of icon file (status.c)
iconsdir = $(CDE_INSTALLATION_TOP)/appconfig/icons/C
dist_icons_DATA = icons/McdeVolumeHigh.t.pm icons/McdeVolumeLow.t.pm \
icons/McdeVolumeMuted.t.pm icons/McdeBluetoothOn.t.pm \
icons/McdeBluetoothOff.t.pm icons/McdeWifi.t.pm icons/McdeWired.t.pm \
icons/McdeNetworkOff.t.pm icons/McdeWired.m.pm icons/McdeBluetooth.m.pm \
icons/McdeBatteryFull.t.pm icons/McdeBatteryHalf.t.pm \
icons/McdeBatteryLow.t.pm icons/McdeBatteryCharging.t.pm
check_PROGRAMS = test_items
test_items_SOURCES = test_items.c items.c items.h
TESTS = test_items