valr / cbatticon

A lightweight and fast battery icon that sits in your system tray
GNU General Public License v2.0
170 stars 40 forks source link

Notification shown twice - power supplies changed #38

Closed dglava closed 7 years ago

dglava commented 7 years ago

During startup, cbatticon shows the notification normally. Then upon the next update interval it reports that the power supplies changed and it displays the notification again.

Here's the output with the -d flag:

** (cbatticon:1203): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-KPaUdzRKlf: Connection refused
power supplies changed: old total/num ps=0/0, new total/num ps=2/0
workaround: current rate is not available, estimating rate
battery path: /sys/class/power_supply/BAT0
ac path: /sys/class/power_supply/AC
battery present: 1
battery status: 1 - Unknown
ac online: 1
battery string: Battery is charging (42%)
tooltip: Battery is charging (42%)
icon name: battery-good-charging
power supplies changed: old total/num ps=2/0, new total/num ps=2/2
workaround: current rate is not available, estimating rate
battery path: /sys/class/power_supply/BAT0
ac path: /sys/class/power_supply/AC
battery present: 1
battery status: 1 - Unknown
ac online: 1
battery string: Battery is charging (42%)
tooltip: Battery is charging (42%)
icon name: battery-good-charging
battery present: 1
battery status: 1 - Unknown
ac online: 1
battery string: Battery is charging (42%)
tooltip: Battery is charging (42%)
icon name: battery-good-charging

The power supplies changed: old total/num ps=0/0, new total/num ps=2/0 line which changes to power supplies changed: old total/num ps=2/0, new total/num ps=2/2 upon the next refresh interval seems to be relevant.

Cbatticon: 1.6.5 Running on Arch Linux.

valr commented 7 years ago

Hi, Yes, I know that bug, I have to find time to fix it. Thanks for reporting.