Skip to content

Commit

Permalink
Add Exit to main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Kangie committed Mar 4, 2024
1 parent bf8467f commit ff925cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions komorebi/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ def __init__(self, monitor_index):

self.change_wallpaper_item = BubbleMenuItem("Change Wallpaper", self.menu_change_wallpaper)
self.settings_item = BubbleMenuItem("Desktop Preferences", self.menu_open_settings)
self.exit_item = BubbleMenuItem(f"Exit {komorebi.__package_name__}", self.menu_exit)

self.bubble_menu.meta_options.add_child(self.change_wallpaper_item)
self.bubble_menu.meta_options.add_child(self.settings_item)
self.bubble_menu.meta_options.add_child(self.exit_item)

self.stage.add_child(self.wallpaper_root)
self.stage.add_child(self.overlay_root)
Expand Down Expand Up @@ -132,6 +134,11 @@ def menu_change_wallpaper(self, item, e):
self.emit('settings_requested', True)
return False

def menu_exit(self, item, e):
logging.debug("Exit clicked")
Clutter.main_quit()
return False

def menu_open_settings(self, item, e):
logging.debug("Open Settings clicked")
self.emit('settings_requested', False)
Expand Down

0 comments on commit ff925cb

Please sign in to comment.