revert network stringfmt because of 'Unknown format code 'f''

This commit is contained in:
daniel.mevec 2024-02-20 08:02:57 +01:00
parent bd8fbf3390
commit b36e827c5a
2 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@ import subprocess
from libqtile import qtile
from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen, ScratchPad, DropDown
# from libqtile.command import lazy
from libqtile import layout, bar, hook #,widget
from libqtile import layout, bar, hook # ,widget
from libqtile.lazy import lazy
# from libqtile.utils import guess_terminal
from libqtile.dgroups import simple_key_binder
@ -277,7 +277,7 @@ def init_widgets_list():
),
widget.Net(
interface=get_network_interface(),
format='{down:5.2f} ↓↑ {up:5.2f}',
format='{down} ↓↑ {up}',
prefix='M',
foreground=Colors.bg,
background=Colors.aqua,

View file

@ -34,7 +34,7 @@ def get_batteries():
txt = proc_grep.decode('utf-8')
return [line.split('_')[-1] for line in txt.splitlines(keepends=False)]
except Exception:
return []
return []
def get_network_interface():