Merge pull request #30 from joshlay/housekeeping
v0.1.17: misc housekeeping
This commit is contained in:
commit
e3c10fd419
4 changed files with 34 additions and 10 deletions
|
@ -7,7 +7,7 @@ A Python module/TUI for AMD GPU statistics
|
||||||
Tested _only_ on `RX6000` series cards; APUs and more _may_ be supported. Please file an issue if finding incompatibility!
|
Tested _only_ on `RX6000` series cards; APUs and more _may_ be supported. Please file an issue if finding incompatibility!
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
```
|
```bash
|
||||||
pip install amdgpu-stats
|
pip install amdgpu-stats
|
||||||
```
|
```
|
||||||
To use the _TUI_, run `amdgpu-stats` in your terminal of choice. For the _module_, see below!
|
To use the _TUI_, run `amdgpu-stats` in your terminal of choice. For the _module_, see below!
|
||||||
|
@ -15,7 +15,7 @@ To use the _TUI_, run `amdgpu-stats` in your terminal of choice. For the _module
|
||||||
## Module
|
## Module
|
||||||
|
|
||||||
Introduction:
|
Introduction:
|
||||||
```
|
```python
|
||||||
In [1]: import amdgpu_stats.utils
|
In [1]: import amdgpu_stats.utils
|
||||||
|
|
||||||
In [2]: amdgpu_stats.utils.AMDGPU_CARDS
|
In [2]: amdgpu_stats.utils.AMDGPU_CARDS
|
||||||
|
|
|
@ -1,12 +1,23 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "amdgpu-stats"
|
name = "amdgpu-stats"
|
||||||
version = "0.1.16"
|
version = "0.1.17"
|
||||||
description = "A module/TUI for AMD GPU statistics"
|
description = "A module/TUI for AMD GPU statistics"
|
||||||
authors = ["Josh Lay <pypi@jlay.io>"]
|
authors = ["Josh Lay <pypi@jlay.io>"]
|
||||||
repository = "https://github.com/joshlay/amdgpu_stats"
|
repository = "https://github.com/joshlay/amdgpu_stats"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
documentation = "https://amdgpu-stats.readthedocs.io/en/latest/"
|
documentation = "https://amdgpu-stats.readthedocs.io/en/latest/"
|
||||||
|
classifiers = [
|
||||||
|
"Environment :: Console",
|
||||||
|
"Environment :: GPU",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Intended Audience :: End Users/Desktop",
|
||||||
|
"Intended Audience :: System Administrators",
|
||||||
|
"Operating System :: POSIX :: Linux",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.9"
|
python = "^3.9"
|
||||||
|
|
|
@ -7,6 +7,7 @@ GPUStatsWidget {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* min-width: 50;*/
|
/* min-width: 50;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.logs {
|
.logs {
|
||||||
height: 1fr;
|
height: 1fr;
|
||||||
}
|
}
|
||||||
|
@ -24,6 +25,13 @@ TabbedContent {
|
||||||
height: 1fr;
|
height: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TabPane {
|
||||||
|
padding: 0 1;
|
||||||
|
border-bottom: heavy $primary-background;
|
||||||
|
border-subtitle-color: $text-disabled;
|
||||||
|
height: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
Notification {
|
Notification {
|
||||||
dock: bottom;
|
dock: bottom;
|
||||||
layer: notification;
|
layer: notification;
|
||||||
|
@ -60,3 +68,8 @@ Footer {
|
||||||
.footer--key {
|
.footer--key {
|
||||||
background: #004578;
|
background: #004578;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScrollBar {
|
||||||
|
border-top: solid $panel-lighten-3;
|
||||||
|
border-bottom: solid $panel-lighten-3;
|
||||||
|
}
|
||||||
|
|
|
@ -183,7 +183,8 @@ class app(App): # pylint: disable=invalid-name
|
||||||
|
|
||||||
# set the title - same as the class, but with spaces
|
# set the title - same as the class, but with spaces
|
||||||
TITLE = 'AMD GPU Stats'
|
TITLE = 'AMD GPU Stats'
|
||||||
SUB_TITLE = ''
|
# set a default subtitle, will change with the active tab
|
||||||
|
SUB_TITLE = f'cards: {list(AMDGPU_CARDS)}'
|
||||||
|
|
||||||
# setup keybinds
|
# setup keybinds
|
||||||
BINDINGS = [
|
BINDINGS = [
|
||||||
|
@ -243,9 +244,8 @@ class app(App): # pylint: disable=invalid-name
|
||||||
|
|
||||||
def on_tabbed_content_tab_activated(self, event: TabbedContent.TabActivated):
|
def on_tabbed_content_tab_activated(self, event: TabbedContent.TabActivated):
|
||||||
"""Listens to 'TabActivated' event, sets subtitle"""
|
"""Listens to 'TabActivated' event, sets subtitle"""
|
||||||
# if self.tabbed_container.active == "tab_logs":
|
active_tab = event.tabbed_content.active.replace('tab_', '')
|
||||||
active_title = event.tabbed_content.active.title().replace('Tab_', '')
|
if active_tab == "logs":
|
||||||
if event.tabbed_content.active == "tab_logs":
|
self.sub_title = active_tab # pylint: disable=attribute-defined-outside-init
|
||||||
self.sub_title = active_title # pylint: disable=attribute-defined-outside-init
|
elif active_tab == "stats":
|
||||||
elif event.tabbed_content.active == "tab_stats":
|
self.sub_title = f'cards: {list(AMDGPU_CARDS)}' # pylint: disable=attribute-defined-outside-init
|
||||||
self.sub_title = f'{active_title}: {list(AMDGPU_CARDS)}' # pylint: disable=attribute-defined-outside-init
|
|
||||||
|
|
Reference in a new issue