Skip to content

Commit

Permalink
Add percentage signal strength format argument
Browse files Browse the repository at this point in the history
  • Loading branch information
t-troebst authored and firecat53 committed Jun 30, 2023
1 parent 2777e67 commit 265230c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion networkmanager_dmenu
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 265230c

Please sign in to comment.