add system monitors
This commit is contained in:
parent
663852b972
commit
ff506e1734
|
@ -27,7 +27,7 @@ for i in groups:
|
|||
Key(
|
||||
[mod],
|
||||
i.name,
|
||||
lazy.group[i.name].toscreen(),
|
||||
lazy.group[i.name].toscreen(toggle=True),
|
||||
desc="Switch to group {}".format(i.name),
|
||||
),
|
||||
# mod1 + shift + letter of group = switch to & move focused window to group
|
||||
|
|
|
@ -12,7 +12,13 @@ def set_all_float_windows_to_non_floating_mode(qtile):
|
|||
def get_currently_playing():
|
||||
output: str = (
|
||||
subprocess.run(
|
||||
["playerctl", "metadata", "--format", r"{{artist}} - {{title}}"],
|
||||
[
|
||||
"playerctl",
|
||||
"metadata",
|
||||
"--format",
|
||||
r"{{artist}} - {{title}}",
|
||||
"--player=cmus,%any",
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
.stdout.decode("utf-8")
|
||||
|
|
10
my_keys.py
10
my_keys.py
|
@ -11,13 +11,13 @@ _mediaChord = KeyChord(
|
|||
"m",
|
||||
[
|
||||
Key([], "j", lazy.spawn("pactl set-sink-volume 0 -10%")),
|
||||
Key(["shift"], "j", lazy.spawn("playerctl volume 0.1-")),
|
||||
Key(["shift"], "j", lazy.spawn("playerctl volume 0.1- --player=cmus,%any")),
|
||||
Key([], "k", lazy.spawn("pactl set-sink-volume 0 +10%")),
|
||||
Key(["shift"], "k", lazy.spawn("playerctl volume 0.1+")),
|
||||
Key(["shift"], "k", lazy.spawn("playerctl volume 0.1+, --player=cmus,%any")),
|
||||
Key([], "m", lazy.spawn("pactl set-sink-mute 0 toggle")),
|
||||
Key([], "space", lazy.spawn("playerctl play-pause")),
|
||||
Key([], "l", lazy.spawn("playerctl next")),
|
||||
Key([], "h", lazy.spawn("playerctl previous")),
|
||||
Key([], "space", lazy.spawn("playerctl play-pause --player=cmus,%any")),
|
||||
Key([], "l", lazy.spawn("playerctl next --player=cmus,%any")),
|
||||
Key([], "h", lazy.spawn("playerctl previous --player=cmus,%any")),
|
||||
Key([], "c", lazy.group["scratchpad"].dropdown_toggle("cmus")),
|
||||
],
|
||||
mode=" media",
|
||||
|
|
|
@ -66,54 +66,47 @@ def _get_powerline_arrow(direction: _PowerLineDirection, accent: _Accent, end=Fa
|
|||
)
|
||||
|
||||
|
||||
_net = widget.TextBox(
|
||||
_net = widget.Net(
|
||||
**get_defaults(),
|
||||
background=my_globals.colors["accent-dark"],
|
||||
foreground=my_globals.colors["on-accent-dark"],
|
||||
text="",
|
||||
)
|
||||
|
||||
_netgraph = widget.NetGraph(
|
||||
**get_defaults(),
|
||||
type="linefill",
|
||||
border_width=0,
|
||||
graph_color=my_globals.colors["on-accent-dark"],
|
||||
fill_color=my_globals.colors["on-accent-dark"],
|
||||
background=my_globals.colors["accent-dark"],
|
||||
format=" {down}↓↑{up}",
|
||||
prefix="M",
|
||||
)
|
||||
|
||||
|
||||
_cpu = widget.TextBox(
|
||||
_cpu = widget.CPU(
|
||||
**get_defaults(),
|
||||
update_interval=5,
|
||||
background=my_globals.colors["accent-dark"],
|
||||
foreground=my_globals.colors["on-accent-dark"],
|
||||
text="",
|
||||
)
|
||||
|
||||
_cpu_graph = widget.CPUGraph(
|
||||
**get_defaults(),
|
||||
type="linefill",
|
||||
border_width=0,
|
||||
graph_color=my_globals.colors["on-accent-dark"],
|
||||
fill_color=my_globals.colors["on-accent-dark"],
|
||||
background=my_globals.colors["accent-dark"],
|
||||
format=" {load_percent}%",
|
||||
)
|
||||
|
||||
|
||||
_weather = widget.OpenWeather(
|
||||
**get_defaults(),
|
||||
background=_Accent.A.value,
|
||||
location="Hamburg",
|
||||
location="Eidelstedt",
|
||||
foreground=my_globals.colors["on-accent-dark"],
|
||||
format="{icon} {main_temp}°{units_temperature} {weather_details}",
|
||||
format="{icon} {main_temp: .0f}°{units_temperature} {weather_details}",
|
||||
)
|
||||
|
||||
_tray = widget.Systray(
|
||||
**get_defaults(),
|
||||
background=_Accent.A.value,
|
||||
background=_Accent.B.value,
|
||||
foreground=my_globals.colors["on-accent-light"],
|
||||
)
|
||||
|
||||
_ram = widget.Memory(
|
||||
**get_defaults(),
|
||||
background=_Accent.A.value,
|
||||
foreground=my_globals.colors["on-accent-dark"],
|
||||
measure_mem="G",
|
||||
update_interval=5,
|
||||
format=" {MemUsed:.2f}{mm}",
|
||||
)
|
||||
|
||||
_groups = widget.GroupBox(
|
||||
**get_defaults(),
|
||||
highlight_method="line",
|
||||
|
@ -209,12 +202,10 @@ def _get_bar_contents(primary=False):
|
|||
_weather,
|
||||
]
|
||||
if primary:
|
||||
l.insert(0, _tray)
|
||||
else:
|
||||
l.insert(1, _tray)
|
||||
l = [
|
||||
_net,
|
||||
_netgraph,
|
||||
_ram,
|
||||
_cpu,
|
||||
_cpu_graph,
|
||||
] + l
|
||||
return l
|
||||
|
|
Loading…
Reference in New Issue