Skip to content

show Full when battery is 100% #4961

@PaoloJr

Description

@PaoloJr

I noticed the default battery module disappearing when left-clicked and battery is 100%. My current config is:

	"battery": {
		"states": {
			"warning": 20,
			"critical": 10
		},
		"format": "{capacity}%",
		"format-charging": "⚡{capacity}%",
		"format-plugged": " {capacity}%",
		"format-alt": "{time}",
		"tooltip": true,
		"tooltip-format": "{timeTo}\npower: {power}w\nhealth: {health}%",
		"on-click-right": "foot sudo powertop"
	}

because format-alt is present, the "disappearing" behaviour exists. Removing format-alt could be a workaround to make the module non-left-clickable, but showing "Full" (or some text) seems more appropriate.

I have made that change in a fork of the project and tested with waybar -l debug and see this output when left clicking the battery module a few times which toggles between showing "100%" and "Full":

[2026-03-28 23:00:33.308] [debug] Cmd exited with code 0
[2026-03-28 23:00:33.308] [debug] Received SIGCHLD in signalThread
[2026-03-28 23:00:33.358] [debug] Cmd exited with code 0
[2026-03-28 23:00:33.358] [debug] Received SIGCHLD in signalThread
[2026-03-28 23:00:38.352] [debug] Cmd exited with code 0
[2026-03-28 23:00:38.352] [debug] Received SIGCHLD in signalThread
[2026-03-28 23:00:38.427] [debug] Cmd exited with code 0
[2026-03-28 23:00:38.427] [debug] Received SIGCHLD in signalThread
[2026-03-28 23:00:43.409] [debug] Cmd exited with code 0
[2026-03-28 23:00:43.409] [debug] Received SIGCHLD in signalThread
[2026-03-28 23:00:43.496] [debug] Cmd exited with code 0
[2026-03-28 23:00:43.497] [debug] Received SIGCHLD in signalThread

Any issues with the output?

the update relates to the formatTimeRemaining function in battery.cpp that currently returns "" when full_hours and minutes equal 0

the change shows "Full", consistent with the tooltip's {timeTo}. Open to submitting a PR if the change is acceptable.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions