Skip to content

Commit b6cbbe9

Browse files
authored
Merge pull request #58 from derenv/readme_update
migrated docs from obsidian
2 parents b5d5ae6 + 53ccbd6 commit b6cbbe9

14 files changed

+187
-45
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2022 Deren Vural
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
14
# These are supported funding model platforms
25

36
github: derenv # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
15
---
26
name: Bug report
37
about: Create a report to help us improve

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
15
---
26
name: Feature request
37
about: Suggest an idea for this project

.github/ISSUE_TEMPLATE/report-a-security-vulnerability.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
15
---
26
name: Report a security vulnerability
37
about: Please review our [security policy](https://github.com/derenv/gtk4-nvidia-monitor-rust/security/policy)

README.md

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,71 +3,70 @@ SPDX-FileCopyrightText: 2022 Deren Vural
33
SPDX-License-Identifier: GPL-3.0-or-later
44
-->
55

6-
# Description
7-
8-
[![wakatime](https://wakatime.com/badge/user/8ce81774-1d46-4c72-8a15-b5cf4032138f/project/64d5b278-0a3f-4b93-9a34-5cf88c7a8a3a.svg)](https://wakatime.com/badge/user/8ce81774-1d46-4c72-8a15-b5cf4032138f/project/64d5b278-0a3f-4b93-9a34-5cf88c7a8a3a)
6+
[![wakatime](https://wakatime.com/badge/user/8ce81774-1d46-4c72-8a15-b5cf4032138f/project/64d5b278-0a3f-4b93-9a34-5cf88c7a8a3a.svg)](https://wakatime.com/badge/user/8ce81774-1d46-4c72-8a15-b5cf4032138f/project/64d5b278-0a3f-4b93-9a34-5cf88c7a8a3a) ![CI](https://github.com/derenv/gtk4-nvidia-monitor-rust/actions/workflows/rust.yml/badge.svg) [![Test Coverage](https://codecov.io/gh/derenv/gtk4-nvidia-monitor-rust/branch/main/graph/badge.svg?token=PHDU5O3VFZ)](https://codecov.io/gh/derenv/gtk4-nvidia-monitor-rust)[![License: GPL v3.0+](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
97

10-
![CI](https://github.com/derenv/gtk4-nvidia-monitor-rust/actions/workflows/rust.yml/badge.svg)
8+
# Description
9+
Initially intended as a rewrite of [gnome-nvidia-extension](https://github.com/ethanwharris/gnome-nvidia-extension) as a practise Rust project, this app has developed into a tool for interacting with GPU management interfaces like Nvidia's [nvidia-settings](https://github.com/NVIDIA/nvidia-settings), [nvidia-smi](https://developer.nvidia.com/nvidia-system-management-interface) and [optimus](https://www.nvidia.com/en-gb/geforce/technologies/optimus/). This includes viewing statistics like temperature, clock speeds, VRAM usage but also setting fan-profiles and GPU overclocks (like [GreenWithEnvy](https://gitlab.com/leinardi/gwe/), a major inspiration for this app).
1110

12-
[![Test Coverage](https://codecov.io/gh/derenv/gtk4-nvidia-monitor-rust/branch/main/graph/badge.svg?token=PHDU5O3VFZ)](https://codecov.io/gh/derenv/gtk4-nvidia-monitor-rust)
11+
The intention is to replace both GPU overclocking software like [GreenWithEnvy](https://gitlab.com/leinardi/gwe/) and system tray monitoring programs/extensions like [gnome-nvidia-extension](https://github.com/ethanwharris/gnome-nvidia-extension) with a single interface, to simplify GPU management. Hopefully the app can be extended to AMD's equivalent GPU management interfaces (if they exist) at some point (see the [Roadmap](docs/ROADMAP.md) for the rest of the plan for this app)
1312

14-
This project is a rewrite of gnome-nvidia-extension in Rust - intended as a practise Rust project.
13+
The app is written entirely in [gtk-rs](https://gtk-rs.org/), using [gtk4](https://github.com/gtk-rs/gtk4-rs) and [libadwaita](https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs/).
1514

1615
# Usage
16+
To first install/update the settings schema, use the following:
17+
```bash
18+
bash install_schemas.sh
19+
```
1720

18-
Use the following to compile the project:
21+
Then, use the following to compile the project:
22+
```bash
23+
cargo clean; cargo build
24+
```
1925

26+
Finally, run the app:
2027
```bash
21-
cargo clean; cargo run
28+
cargo run
2229
```
2330

2431
# Resources
25-
26-
## Original Extension
27-
28-
[Original version, written in GTK-JS](https://github.com/ethanwharris/gnome-nvidia-extension)
29-
32+
## Applications
33+
- [Original version, written in GTK-JS](https://github.com/ethanwharris/gnome-nvidia-extension)
34+
- [nvidia-settings](https://github.com/NVIDIA/nvidia-settings)
35+
- [nvidia-smi](https://developer.nvidia.com/nvidia-system-management-interface)
36+
- [optimus](https://www.nvidia.com/en-gb/geforce/technologies/optimus/)
37+
- [GreenWithEnvy (GWE)]()
3038
## Documentation
31-
3239
- [GTK-RS Project website](https://gtk-rs.org/)
3340
- [GTK-RS Book](https://gtk-rs.org/gtk4-rs/stable/latest/book/introduction.html)
3441
- [GTK-RS Documentation](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/)
3542
- [GLib Documentation](https://docs.gtk.org/glib/index.html)
3643
- [GObject Documentation](https://docs.gtk.org/gobject/index.html)
37-
38-
## GitHub
39-
44+
- [Gio Documentation](https://docs.gtk.org/gio/index.html)
45+
- [LibAdwaita-rs Documentation](https://relm4.org/docs/stable/libadwaita/index.html)
46+
- [Gnome HIG](https://developer.gnome.org/hig/index.html)
47+
## Git
4048
- [GTK-RS Organisation on GitHub](https://github.com/gtk-rs)
4149
- [GTK-RS Core](https://github.com/gtk-rs/gtk-rs-core)
42-
- [GTK3-RS](https://github.com/gtk-rs/gtk3-rs)
4350
- [GTK4-RS](https://github.com/gtk-rs/gtk4-rs)
51+
- [LibAdwaita-rs](https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs/)
4452

4553
## Crates
46-
4754
### GTK libraries
55+
- [gtk4](https://crates.io/crates/gtk4)
56+
- [gdk4](https://crates.io/crates/gdk4)
57+
- [gtk4-macros](https://crates.io/crates/gtk4-macros)
58+
- [LibAdwaita](https://crates.io/crates/libadwaita)
4859

49-
- [GTK4](https://crates.io/crates/gtk4)
50-
- [GLib](https://crates.io/crates/glib/0.15.12)
51-
- [Gio](https://crates.io/crates/gio/0.15.12)
52-
60+
## Examples & Discussion
61+
These are intended as pointers for others creating gtk-rs projects, as they took a while to wrap my head around (or i haven't yet).
5362
### System Tray Library
54-
55-
[libappindicator](https://crates.io/crates/libappindicator/0.7.1)
56-
57-
There are other ways of doing this - libappindicator seems broken..
58-
59-
## Examples
60-
61-
- [GObject Subclassing (GTK3)](https://github.com/gtk-rs/gtk3-rs/tree/master/examples/basic_subclass)
62-
- [GObject Subclassing (GTK4)](https://github.com/gtk-rs/gtk4-rs/tree/8b0c4cbd35912b9f8685d40f796b0806c52119ab/book/listings/todo/1)
63-
- [System Tray (libappindicator)](https://github.com/tauri-apps/libappindicator-rs/blob/main/examples/hello.rs)
64-
65-
## System Tray Discussion
66-
67-
[Reddit Post](https://www.reddit.com/r/gnome/comments/7x7qc6/by_what_logic_was_system_tray_removed/)
68-
69-
The post above has possible alternatives to libappindicator in the comments
63+
(see [System Tray](docs/system_tray.md) for discussion)
64+
### Subclassing
65+
(see [Subclassing](docs/subclassing.md) for discussion)
66+
### Async
67+
(see [Async](docs/async.md) for discussion)
68+
### Signals
69+
(see [Signals](docs/signals.md) for discussion)
7070

7171
# License
72-
73-
[![License: GPL v3.0+](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
72+
The app is licensed under [GPL3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html)

SECURITY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
15
# Security Policy
26

37
## Supported Versions

docs/CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
15
# Contributor Covenant Code of Conduct
26

37
## Our Pledge

docs/CONTRIBUTING.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
15
# Welcome to gtk4-nvidia-monitor-rust contributing guide
26

37
Thank you for investing your time in contributing to our project!
@@ -24,7 +28,7 @@ Issues tagged "good first issue" and "help wanted" are your best bet - otherwise
2428

2529
#### Create a new issue
2630

27-
If you spot a bug or want a new feature, [search if an issue already exists](https://github.com/derenv/gtk4-nvidia-monitor-rust/issues). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/derenv/gtk4-nvidia-monitor-rust/issues/new/choose).
31+
If you spot a bug or want a new feature, [search if an issue already exists](https://github.com/derenv/gtk4-nvidia-monitor-rust/issues). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/derenv/gtk4-nvidia-monitor-rust/issues/new/choose).
2832

2933
#### Solve an issue
3034

@@ -34,7 +38,7 @@ Scan through our [existing issues](https://github.com/derenv/gtk4-nvidia-monitor
3438

3539
#### Make changes in the UI
3640

37-
Click **Make a contribution** at the bottom of any docs page to make small changes such as a typo, sentence fix, or a broken link. This takes you to the `.md` file where you can make your changes and [create a pull request](#pull-request) for a review.
41+
Click **Make a contribution** at the bottom of any docs page to make small changes such as a typo, sentence fix, or a broken link. This takes you to the `.md` file where you can make your changes and [create a pull request](#pull-request) for a review.
3842

3943
#### Make changes locally
4044

@@ -57,7 +61,7 @@ Commit the changes once you are happy with them.
5761
### Pull Request
5862

5963
When you're finished with the changes, create a pull request, also known as a PR.
60-
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
64+
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
6165
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
6266
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
6367
Once you submit your PR, a team member will review your proposal. We may ask questions or request additional information.

docs/ROADMAP.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
5+
6+
# Roadmap
7+
8+
- [x] Basic Functionality
9+
- [ ] Match GWE Functionality
10+
- [ ] Full statistics
11+
- [ ] Add fan-curve support
12+
- [ ] Add clock speed support
13+
- [ ] Improve on GWE Functionality
14+
- [ ] Customizable tabs/views of statistics
15+
- [x] Can set name of each tab/view
16+
- [x] Can set the list of properties in each tab/view
17+
- [x] Can re-order list of properties in each tab/view
18+
- [ ] Can set icon of each tab/view
19+
- [ ] Better overclocking support
20+
- [ ] Improve settings application support
21+
- [x] Add ability to open settings app
22+
- [ ] Add ability to set settings application in the app settings
23+
- [ ] Add provider application support
24+
- [x] Add ability to set provider application in the app settings
25+
- [x] nvidia-settings (Nvidia)
26+
- [x] nvidia-smi (Nvidia)
27+
- [x] optimus (Nvidia)
28+
- [ ] Cover bug described [here](https://github.com/ethanwharris/gnome-nvidia-extension/issues/206)
29+
- [ ] Find suitable AMD-based app
30+
31+
## Basic Functionality
32+
match old extension, basic design of app
33+
34+
## Full Statistics
35+
match GWE
36+
37+
## Add fan-curve support
38+
match GWE
39+
40+
## Add Clock speed support
41+
match GWE
42+
43+
## Customizable Tabs of Statistics
44+
i.e. improve on GWE
45+
46+
## Improve settings app support
47+
Can open settings app (nvidia-settings), this should be set within the app settings.
48+
49+
## Improve provider app support
50+
### Nvidia
51+
Currently, the app allows interacting with GPU management interfaces like Nvidia's [nvidia-settings](https://github.com/NVIDIA/nvidia-settings) and [nvidia-smi](https://developer.nvidia.com/nvidia-system-management-interface), and [optimus](https://www.nvidia.com/en-gb/geforce/technologies/optimus/).
52+
53+
#NOTE There is an issue in the [original extension](https://github.com/ethanwharris/gnome-nvidia-extension) with nvidia-settings and nvidia-smi (and thus also optimus) where fan speed is unavailable to query and thus breaks the functionality of the extension. This highlights an issue - what to do if results given by the provider are invalid? How can we check this when modifying GPU views so that the user cannot add invalid statistics? Should the statistic instead show an error message (i.e. "This statistic is not valid for this GPU..")?
54+
55+
### AMD
56+
Hopfully we can support some equivalent provider for AMD, for example [radeon-profile](https://github.com/marazmista/radeon-profile), a GPU management interface developed by [marazmista](https://github.com/marazmista) (though it has not been updated since 2020...).
57+
58+
#NOTE This will require a name change!
59+
60+
### Mesa/Nouveau
61+
Currently no research has been done re the open source drivers, as to my knowledge there are no equivalent GPU management interfaces for these.

docs/async.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2022 Deren Vural
3+
SPDX-License-Identifier: GPL-3.0-or-later
4+
-->
5+
6+
# Description
7+
TODO: ???
8+
9+
# Resources
10+
## Examples
11+
TODO: ???

0 commit comments

Comments
 (0)