Fix right/middle click network icon to configure

This commit is contained in:
Kevin Alberts 2025-08-11 17:50:31 +02:00
parent 812eb28abc
commit 86e4404660
4 changed files with 6 additions and 5 deletions

View file

@ -31,7 +31,7 @@ class Config(BaseConfig):
file_manager = "thunar"
visualizer_app = "glava"
web_browser = "firefox"
network_config = "true"
network_config = None
# Autostart applications
apps_autostart_group = [

View file

@ -11,7 +11,7 @@ class Config(GeneralConfig):
#app_terminal = "terminator"
cmd_brightness_up = "brightnessctl -d intel_backlight set +5%"
cmd_brightness_down = "brightnessctl -d intel_backlight set 5%-"
network_config = "nm-applet"
network_config = "nm-connection-editor"
#lock_command = "bash /home/kevin/bin/lock.sh"
# Thermal indicator variables

View file

@ -512,7 +512,8 @@ class Kuro(BaseTheme):
kuro.utils.widgets.NetworkInfoWidget(
fontsize_left=16, fontsize_right=14,
wireless_interface=Config.get('wifi_interface', None),
wired_interface=Config.get('wired_interface', None)
wired_interface=Config.get('wired_interface', None),
config_application=Config.get('network_config', None),
),
])

View file

@ -621,7 +621,7 @@ class NetworkInfoWidget(DualPaneTextboxBase):
('critical_color', "#ffffff", "Color when value is critical"),
('wireless_interface', "wifi0", "Wireless interface device name"),
('wired_interface', "enp7s0", "Wired interface device name"),
('config_application', "true", "Application to launch when right/middle clicking"),
('config_application', None, "Application to launch when right/middle clicking"),
]
def __init__(self, **config):
@ -748,7 +748,7 @@ class NetworkInfoWidget(DualPaneTextboxBase):
notify(None, title, "{}\n\n{}".format(wifi_text, wired_text))
else:
notify(None, title, "\n{}".format(wired_text))
if button == BUTTON_LEFT or button == BUTTON_MIDDLE:
if button == BUTTON_RIGHT or button == BUTTON_MIDDLE:
if self.config_application:
execute(self.config_application)