From 46bc455b627c926a0faab90e0a9e4d66aa8232d2 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 18 Sep 2023 15:48:56 +0200 Subject: [PATCH] version: 2.4.2 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/bt-tether.py | 6 +++--- pwnagotchi/plugins/default/internet-connection.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pwnagotchi/plugins/default/bt-tether.py b/pwnagotchi/plugins/default/bt-tether.py index a65c603b..67a95a9b 100644 --- a/pwnagotchi/plugins/default/bt-tether.py +++ b/pwnagotchi/plugins/default/bt-tether.py @@ -151,7 +151,6 @@ class BTNap: return None - def is_paired(self): """ Check if already connected @@ -579,8 +578,9 @@ class BTTether(plugins.Plugin): def on_ui_setup(self, ui): with ui._lock: - ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', position=(ui.width() / 2 - 15, 0), - label_font=fonts.Bold, text_font=fonts.Medium)) + ui.add_element('bluetooth', LabeledValue(color=BLACK, label='BT', value='-', + position=(ui.width() / 3 - 15, 0), + label_font=fonts.Bold, text_font=fonts.Medium)) def on_ui_update(self, ui): ui.set('bluetooth', self.status) diff --git a/pwnagotchi/plugins/default/internet-connection.py b/pwnagotchi/plugins/default/internet-connection.py index 082c0a7e..92045c68 100644 --- a/pwnagotchi/plugins/default/internet-connection.py +++ b/pwnagotchi/plugins/default/internet-connection.py @@ -31,8 +31,8 @@ class InternetConnectionPlugin(plugins.Plugin): with ui._lock: # add a LabeledValue element to the UI with the given label and value # the position and font can also be specified - ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='', value='', - position=(0, 30), label_font=fonts.Small, + ui.add_element('connection_status', components.LabeledValue(color=view.BLACK, label='WWW', value='-', + position=(0, 30), label_font=fonts.Bold, text_font=fonts.Small)) def on_ui_update(self, ui): @@ -44,10 +44,10 @@ class InternetConnectionPlugin(plugins.Plugin): # Connect to the host - tells us if the host is actually reachable s = socket.create_connection((host, 80), 2) s.close() - ui.set('connection_status', 'connected') + ui.set('connection_status', 'C') except: # if the command failed, it means there is no active Internet connection - ui.set('connection_status', 'disconnected') + ui.set('connection_status', 'D') def on_unload(self, ui): with ui._lock: