From 265230c7ecaccf7e10f84d4414cd175f85a5b30a Mon Sep 17 00:00:00 2001 From: Thorben Troebst Date: Mon, 12 Jun 2023 00:50:12 -0700 Subject: [PATCH] Add percentage signal strength format argument --- config.ini.example | 1 + networkmanager_dmenu | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.ini.example b/config.ini.example index 4108496..de21a57 100644 --- a/config.ini.example +++ b/config.ini.example @@ -17,6 +17,7 @@ # # Available variables are: # # * {name} - Access point name # # * {sec} - Security type +# # * {signal} - Signal strength on a scale of 0-100 # # * {bars} - Bar-based display of signal strength (see wifi_chars) # # * {icon} - Icon-based display of signal strength (see wifi_icons) # # * {max_len_name} and {max_len_sec} are the maximum lengths of {name} / {sec} diff --git a/networkmanager_dmenu b/networkmanager_dmenu index 398aff3..cc7e1e1 100755 --- a/networkmanager_dmenu +++ b/networkmanager_dmenu @@ -417,7 +417,7 @@ def create_ap_actions(aps, active_ap, active_connection, adapter): # noqa pylin signal_strength = nm_ap.get_strength() bars = strength_bars(signal_strength) icon = strength_icon(signal_strength) - action_name = format.format(name=name, sec=sec, bars=bars, icon=icon, + action_name = format.format(name=name, sec=sec, signal=signal_strength, bars=bars, icon=icon, max_len_name=max_len_name, max_len_sec=max_len_sec) if is_active: ap_actions.append(Action(action_name, process_ap,