try to improve arrangement/formatting consistency
This commit is contained in:
parent
941442ce86
commit
2cdfc0e768
2 changed files with 11 additions and 7 deletions
18
gpustats.py
18
gpustats.py
|
@ -151,18 +151,18 @@ class MiscDisplay(Static):
|
||||||
self.timer_temp = None
|
self.timer_temp = None
|
||||||
|
|
||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
yield Horizontal(Label("[underline]Temperatures:"),
|
yield Horizontal(Label("[underline]Temperatures"),
|
||||||
Label("", classes="statvalue"))
|
Label("", classes="statvalue"))
|
||||||
for temp_node in temp_files:
|
for temp_node in temp_files:
|
||||||
# capitalize the first letter for display
|
# capitalize the first letter for display
|
||||||
caption = temp_node[0].upper() + temp_node[1:]
|
caption = temp_node[0].upper() + temp_node[1:]
|
||||||
yield Horizontal(Label(f'[bold] {caption}:[/]',),
|
yield Horizontal(Label(f' {caption}:',),
|
||||||
Label("", id="temp_" + temp_node, classes="statvalue"))
|
Label("", id="temp_" + temp_node, classes="statvalue"))
|
||||||
yield Horizontal(Label("[underline]Fan RPM:"),
|
yield Horizontal(Label("[underline]Fan RPM"),
|
||||||
Label("", classes="statvalue"))
|
Label("", classes="statvalue"))
|
||||||
yield Horizontal(Label("[bold] Current:[/]",),
|
yield Horizontal(Label(" Current:",),
|
||||||
Label("", id="fan_rpm", classes="statvalue"))
|
Label("", id="fan_rpm", classes="statvalue"))
|
||||||
yield Horizontal(Label("[bold] Target:[/]",),
|
yield Horizontal(Label(" Target:",),
|
||||||
Label("", id="fan_rpm_target", classes="statvalue"))
|
Label("", id="fan_rpm_target", classes="statvalue"))
|
||||||
|
|
||||||
def on_mount(self) -> None:
|
def on_mount(self) -> None:
|
||||||
|
@ -218,12 +218,15 @@ class ClockDisplay(Static):
|
||||||
self.timer_clocks = None
|
self.timer_clocks = None
|
||||||
|
|
||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
yield Horizontal(Label("[underline]Core:"),
|
yield Horizontal(Label("[underline]Clocks"),
|
||||||
Label("", classes="statvalue"))
|
Label("", classes="statvalue"))
|
||||||
yield Horizontal(Label(" GPU Clock:",),
|
yield Horizontal(Label(" GPU Clock:",),
|
||||||
Label("", id="clk_core_val", classes="statvalue"))
|
Label("", id="clk_core_val", classes="statvalue"))
|
||||||
yield Horizontal(Label(" Memory clock:"),
|
yield Horizontal(Label(" Memory clock:"),
|
||||||
Label("", id="clk_memory_val", classes="statvalue"))
|
Label("", id="clk_memory_val", classes="statvalue"))
|
||||||
|
yield Horizontal(Label(""), Label("", classes="statvalue")) # padding to split groups
|
||||||
|
yield Horizontal(Label("[underline]Core"),
|
||||||
|
Label("", classes="statvalue"))
|
||||||
yield Horizontal(Label(" Utilization:",),
|
yield Horizontal(Label(" Utilization:",),
|
||||||
Label("", id="util_pct", classes="statvalue"))
|
Label("", id="util_pct", classes="statvalue"))
|
||||||
yield Horizontal(Label(" Voltage:",),
|
yield Horizontal(Label(" Voltage:",),
|
||||||
|
@ -269,7 +272,7 @@ class PowerDisplay(Static):
|
||||||
self.timer_micro_watts = None
|
self.timer_micro_watts = None
|
||||||
|
|
||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
yield Horizontal(Label("[underline]Power:"),
|
yield Horizontal(Label("[underline]Power"),
|
||||||
Label("", classes="statvalue"))
|
Label("", classes="statvalue"))
|
||||||
yield Horizontal(Label(" Usage:",),
|
yield Horizontal(Label(" Usage:",),
|
||||||
Label("", id="pwr_avg_val", classes="statvalue"))
|
Label("", id="pwr_avg_val", classes="statvalue"))
|
||||||
|
@ -279,6 +282,7 @@ class PowerDisplay(Static):
|
||||||
Label("", id="pwr_def_val", classes="statvalue"))
|
Label("", id="pwr_def_val", classes="statvalue"))
|
||||||
yield Horizontal(Label(" Board capability:",),
|
yield Horizontal(Label(" Board capability:",),
|
||||||
Label("", id="pwr_cap_val", classes="statvalue"))
|
Label("", id="pwr_cap_val", classes="statvalue"))
|
||||||
|
yield Horizontal(Label(""), Label("", classes="statvalue")) # bottom padding to group
|
||||||
|
|
||||||
def on_mount(self) -> None:
|
def on_mount(self) -> None:
|
||||||
"""Event handler called when widget is added to the app."""
|
"""Event handler called when widget is added to the app."""
|
||||||
|
|
BIN
screens/main.png
BIN
screens/main.png
Binary file not shown.
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
Reference in a new issue