Skip to content

Commit

Permalink
Merge pull request #214 from kenohassler/better-wayland
Browse files Browse the repository at this point in the history
Better wayland
  • Loading branch information
derenv authored Apr 16, 2024
2 parents 187ccd3 + e1bf5d4 commit 52d7d45
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,33 @@
A Gnome extension to show Nvidia GPU information
(https://extensions.gnome.org/extension/1320/nvidia-gpu-stats-tool/)

# Supported Gnome versions
## Supported Gnome versions
The "master" branch supports only Gnome v45+.
For older shell versions, please check out the "legacy" branch.

# Requirements
nvidia-settings and nvidia-smi
## Requirements
The extension requires `nvidia-smi`, which should be included with the drivers.
Additionally, `nvidia-settings` is supported as a data source.

# Installation from git
If you still use [Bumblebee](https://wiki.archlinux.org/title/Bumblebee), the data can also be sourced through `optirun` (this is untested and may be deprecated in future versions).

## Installation from git
git clone https://github.com/ethanwharris/gnome-nvidia-extension.git
cd gnome-nvidia-extension
make
make install

Use `alt + f2`, `r`, `Enter` to restart the gnome shell (if this is not allowed then log out and log back in)
Enable the extension in the gnome tweak tool.
Restart gnome shell to load the extension:
- On Wayland, log out and back in.
- On X11, you can also use `alt + f2`, `r`, `Enter` to reload more quickly.

Afterwards, you can enable the extension in gnome-extensions.

## Selecting Properties
By default, no measurements are displayed in the menu bar.
You can open the dropdown menu and select the properties to be shown.

# Icons
## Icons
For icons we use font-awesome:
http://fontawesome.io/

Expand Down
11 changes: 2 additions & 9 deletions src/nvidiautil@ethanwharris/settingsAndSmiProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@ export class SettingsAndSmiProvider {
}

getProperties(gpuCount) {
this.storedProperties = [
new SettingsProperties.UtilisationProperty(gpuCount, Processor.NVIDIA_SETTINGS),
new SettingsProperties.TemperatureProperty(gpuCount, Processor.NVIDIA_SETTINGS),
new SettingsProperties.MemoryProperty(gpuCount, Processor.NVIDIA_SETTINGS),
new SettingsProperties.FanProperty(gpuCount, Processor.NVIDIA_SETTINGS),
new SmiProperties.PowerProperty(gpuCount, Processor.NVIDIA_SMI),
];
return this.storedProperties;
return this.smi.getProperties(gpuCount);
}

retrieveProperties() {
return this.storedProperties;
return this.smi.retrieveProperties();
}

hasSettings() {
Expand Down

0 comments on commit 52d7d45

Please sign in to comment.