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.

Panel settings switching

by roundabout, Monday, 21 July 2025, 15:10:53 (1753110653), pushed by soreau, Saturday, 9 August 2025, 12:22:36 (1754742156)

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

77cc1cdcaa856f829f73f2eca209aaed433bff38

config.yaml

@@ -10,3 +10,12 @@ panels:

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                right:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                - ClockApplet:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    formatting: '%T, %a %-d %b %Y'
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        - position: bottom
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          monitor: 0
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          size: 40
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          applets:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            left: []
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            centre:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            - LabelApplet:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                text: Multi-panel support
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            right: []
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

main.py

@@ -112,9 +112,13 @@ class PanelManager(Gtk.Window):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    action_group = Gio.SimpleActionGroup()
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                toggle_edit_mode_action = Gio.SimpleAction(name="toggle-edit-mode-switch")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                action_group.add_action(toggle_edit_mode_action)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                toggle_edit_mode_action.connect("activate", lambda *args: self.panel_editing_switch.set_active(not self.panel_editing_switch.get_active()))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                self.next_panel_action = Gio.SimpleAction(name="next-panel")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                action_group.add_action(self.next_panel_action)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                self.next_panel_action.connect("activate", lambda *args: self.panel_stack.set_visible_child(self.panel_stack.get_visible_child().get_next_sibling()))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                self.previous_panel_action = Gio.SimpleAction(name="previous-panel")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                action_group.add_action(self.previous_panel_action)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                self.previous_panel_action.connect("activate", lambda *args: self.panel_stack.set_visible_child(self.panel_stack.get_visible_child().get_prev_sibling()))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    self.insert_action_group("win", action_group)
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    if isinstance(self.get_application(), PanoramaPanel):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -137,6 +141,9 @@ class PanelManager(Gtk.Window):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                def set_visible_panel(self, stack: Gtk.Stack, pspec: GObject.ParamSpec):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    panel: Panel = stack.get_visible_child().panel
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                self.next_panel_action.set_enabled(stack.get_visible_child().get_next_sibling() is not None)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                self.previous_panel_action.set_enabled(stack.get_visible_child().get_prev_sibling() is not None)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                def set_edit_mode(self, switch, value):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    if isinstance(self.get_application(), PanoramaPanel):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        self.get_application().set_edit_mode(value)