Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

battery: make refresh interval configurable

by roundabout, Wednesday, 24 September 2025, 15:25:31 (1758727531), pushed by roundabout, Wednesday, 24 September 2025, 15:25:34 (1758727534)

Author identity: Vlad <vlad.muntoiu@gmail.com>

e517714c94607c5b20b08c0660bc3ba6b10fb744

applets/battery/__init__.py

@@ -85,7 +85,7 @@ class BatteryMonitor(panorama_panel.Applet):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    self.popover_content = Gtk.ListBox()
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    self.update_batteries()
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                GLib.timeout_add_seconds(10, self.update_batteries)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                GLib.timeout_add_seconds(config.get("refresh_interval", 10), self.update_batteries)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                def update_batteries(self):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    self.popover_content.remove_all()