Skip to content

Commit

Permalink
Add wifi quality widget (toaster-only)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Nov 14, 2024
1 parent 605df35 commit e0fc320
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
# settings
arandr
brightnessctl
python3Packages.iwlib

# messaging
discord
Expand Down
24 changes: 21 additions & 3 deletions home/qtile/src/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,32 @@ def mk_overrides(cls, **conf):
)

CPUGraph = mk_overrides(
widget.CPUGraph, type="line", line_width=1, border_width=0
widget.CPUGraph,
type="line",
line_width=1,
border_width=0
)

MemoryGraph = mk_overrides(
widget.MemoryGraph, type="line", graph_color="8B8AF1", line_width=1, border_width=0
widget.MemoryGraph,
type="line",
graph_color="8B8AF1",
line_width=1,
border_width=0
)

Net = mk_overrides(
widget.Net, use_bits=True, format="{down:6.2f}{down_suffix:<2}↓↑{up:6.2f}{up_suffix:<2}"
widget.Net,
use_bits=True,
format="{down:6.2f}{down_suffix:<2}↓↑{up:6.2f}{up_suffix:<2}"
)

# ip a | grep -oP '\d+:\s+w\w+(?=.*\sUP\s)'
# TODO: make it device agnostic
WifiQuality = mk_overrides(
widget.Wlan,
interface="wlp1s0",
format='{percent:2.0%}'
)

GroupBox = mk_overrides(
Expand Down Expand Up @@ -134,6 +151,7 @@ class Bar(bar.Bar):
Mpris2,
Battery,
Net,
WifiQuality,
Memory,
MemoryGraph,
CPUGraph,
Expand Down

0 comments on commit e0fc320

Please sign in to comment.