revert network stringfmt because of 'Unknown format code 'f''
This commit is contained in:
parent
bd8fbf3390
commit
b36e827c5a
2 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ import subprocess
|
||||||
from libqtile import qtile
|
from libqtile import qtile
|
||||||
from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen, ScratchPad, DropDown
|
from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen, ScratchPad, DropDown
|
||||||
# from libqtile.command import lazy
|
# 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.lazy import lazy
|
||||||
# from libqtile.utils import guess_terminal
|
# from libqtile.utils import guess_terminal
|
||||||
from libqtile.dgroups import simple_key_binder
|
from libqtile.dgroups import simple_key_binder
|
||||||
|
|
@ -277,7 +277,7 @@ def init_widgets_list():
|
||||||
),
|
),
|
||||||
widget.Net(
|
widget.Net(
|
||||||
interface=get_network_interface(),
|
interface=get_network_interface(),
|
||||||
format='{down:5.2f} ↓↑ {up:5.2f}',
|
format='{down} ↓↑ {up}',
|
||||||
prefix='M',
|
prefix='M',
|
||||||
foreground=Colors.bg,
|
foreground=Colors.bg,
|
||||||
background=Colors.aqua,
|
background=Colors.aqua,
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ def get_batteries():
|
||||||
txt = proc_grep.decode('utf-8')
|
txt = proc_grep.decode('utf-8')
|
||||||
return [line.split('_')[-1] for line in txt.splitlines(keepends=False)]
|
return [line.split('_')[-1] for line in txt.splitlines(keepends=False)]
|
||||||
except Exception:
|
except Exception:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def get_network_interface():
|
def get_network_interface():
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue