roundabout,
created on Monday, 22 December 2025, 08:47:31 (1766393251),
received on Monday, 22 December 2025, 08:47:36 (1766393256)
Author identity: Vlad <vlad.muntoiu@gmail.com>
23accd9f87b6ed3c9c1722aea2aa57fec43443f2
applets/indicators/__init__.py
@@ -30,7 +30,7 @@ CDLL("libdbusmenu-glib.so")
gi.require_version("Dbusmenu", "0.4")
import panorama_panel
from gi.repository import Gtk, GLib, Gio
from gi.repository import Gtk, GLib, Gio, Gdk
from . import dbusmenu
@@ -39,6 +39,17 @@ locale.bindtextdomain("panorama-indicator-applet", module_directory / "locale")
_ = lambda x: locale.dgettext("panorama-indicator-applet", x)
@Gtk.Template(filename=str(module_directory / "panorama-indicator-applet.ui"))
class IndicatorOptions(Gtk.Window):
__gtype_name__ = "IndicatorOptions"
icon_size_adjustment = Gtk.Template.Child()
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.connect("close-request", lambda *args: self.destroy())
class StatusNotifierService:
"""
<node>
@@ -158,6 +169,23 @@ class IndicatorApplet(panorama_panel.Applet):
self.icon_size = config.get("icon_size", 24)
self.context_menu = self.make_context_menu()
panorama_panel.track_popover(self.context_menu)
right_click_controller = Gtk.GestureClick()
right_click_controller.set_button(3)
right_click_controller.connect("pressed", self.show_context_menu)
self.add_controller(right_click_controller)
action_group = Gio.SimpleActionGroup()
options_action = Gio.SimpleAction.new("options", None)
options_action.connect("activate", self.show_options)
action_group.add_action(options_action)
self.insert_action_group("applet", action_group)
self.options_window = None
self.connection = Gio.bus_get_sync(Gio.BusType.SESSION)
# Make the host name unique
@@ -251,6 +279,43 @@ class IndicatorApplet(panorama_panel.Applet):
self.remove(self.items[service])
del self.items[service]
def make_context_menu(self):
menu = Gio.Menu()
menu.append(_("Indicator _options"), "applet.options")
context_menu = Gtk.PopoverMenu(menu_model=menu, has_arrow=False, halign=Gtk.Align.START, flags=Gtk.PopoverMenuFlags.NESTED)
context_menu.set_parent(self)
return context_menu
def show_context_menu(self, gesture, n_presses, x, y):
rect = Gdk.Rectangle()
rect.x = int(x)
rect.y = int(y)
rect.width = 1
rect.height = 1
self.context_menu.set_pointing_to(rect)
self.context_menu.popup()
def show_options(self, _0=None, _1=None):
if self.options_window is None:
self.options_window = IndicatorOptions()
self.options_window.icon_size_adjustment.set_value(self.icon_size)
self.options_window.icon_size_adjustment.connect("value-changed", self.update_icon_size)
def reset_window(*args):
self.options_window = None
self.options_window.connect("close-request", reset_window)
self.options_window.present()
def update_icon_size(self, adjustment, *args):
self.icon_size = int(adjustment.get_value())
item = self.get_first_child()
while item is not None:
if isinstance(item, StatusIcon):
item.icon.set_pixel_size(self.icon_size)
item = item.get_next_sibling()
def get_config(self):
return {
"icon_size": self.icon_size,
applets/indicators/locale/ro_RO/LC_MESSAGES/panorama-indicator-applet.mo
applets/indicators/panorama-indicator-applet.cmb
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd">
<!-- Created with Cambalache 0.96.3 -->
<cambalache-project version="0.96.0" target_tk="gtk-4.0">
<ui template-class="IndicatorOptions" filename="panorama-indicator-applet.ui" sha256="b09983dfb2da883c7bb315cd5a978de96b3b3442c2f19a7b3c27017f768a122c"/>
</cambalache-project>
applets/indicators/panorama-indicator-applet.ui
@@ -0,0 +1,89 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.96.3 -->
<interface domain="panorama-indicator-applet">
<!-- interface-name panorama-indicator-applet.ui -->
<requires lib="gtk" version="4.18"/>
<template class="IndicatorOptions" parent="GtkWindow">
<property name="title" translatable="yes">Indicator options</property>
<child>
<object class="GtkScrolledWindow">
<child>
<object class="GtkViewport">
<child>
<object class="GtkBox">
<property name="margin-bottom">32</property>
<property name="margin-end">32</property>
<property name="margin-start">32</property>
<property name="margin-top">32</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFrame">
<property name="label-widget">
<object class="GtkLabel">
<property name="label" translatable="yes">Appearance</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</property>
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<child>
<object class="GtkListBoxRow">
<property name="activatable">False</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Icon size</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkBox">
<child>
<object class="GtkScale">
<property name="adjustment">
<object class="GtkAdjustment" id="icon_size_adjustment">
<property name="lower">8.0</property>
<property name="step-increment">1.0</property>
<property name="upper">96.0</property>
<property name="value">24.0</property>
</object>
</property>
<property name="hexpand">True</property>
<marks>
<mark position="bottom" value="16.0"/>
<mark position="bottom" value="24.0"/>
<mark value="32.0"/>
<mark value="48.0"/>
<mark value="64.0"/>
<mark value="96.0"/>
</marks>
</object>
</child>
<child>
<object class="GtkSpinButton">
<property name="adjustment">icon_size_adjustment</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>
applets/indicators/po/messages.pot
@@ -0,0 +1,42 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-21 23:38+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: __init__.py:154
msgid "Indicators"
msgstr ""
#: __init__.py:155
msgid "Show application status icons"
msgstr ""
#: __init__.py:284
msgid "Indicator _options"
msgstr ""
#: panorama-indicator-applet.ui:7
msgid "Indicator options"
msgstr ""
#: panorama-indicator-applet.ui:23
msgid "Appearance"
msgstr ""
#: panorama-indicator-applet.ui:40
msgid "Icon size"
msgstr ""
applets/indicators/po/ro.po
@@ -0,0 +1,43 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-21 23:38+0200\n"
"PO-Revision-Date: 2025-12-21 23:40+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.8\n"
#: __init__.py:154
msgid "Indicators"
msgstr "Indicatoare"
#: __init__.py:155
msgid "Show application status icons"
msgstr "Arată iconițele de stare ale aplicațiilor"
#: __init__.py:284
msgid "Indicator _options"
msgstr "_Opțiunile indicatoarelor"
#: panorama-indicator-applet.ui:7
msgid "Indicator options"
msgstr "Opțiunile indicatoarelor"
#: panorama-indicator-applet.ui:23
msgid "Appearance"
msgstr "Aspect"
#: panorama-indicator-applet.ui:40
msgid "Icon size"
msgstr "Dimensiunea iconițelor"
config.yaml
@@ -69,6 +69,7 @@ panels:
icon_size: 24
low_threshold: 0.15
critical_threshold: 0.05
- ScreenBrightness: {}
- Volume:
percentage_reveal: 1000
popdown_after_manual: 2000