Skip to content

Commit

Permalink
Merge main into trace-logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nokyan committed Dec 24, 2024
2 parents 1388b1f + d1fa7dc commit 42c1bc9
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ body:
description: |
Please provide information about your environment if you were not able to include debug logs as described above.
placeholder: |
Resources version: 1.7.0 (you can find this in the 'About' dialog)
Resources version: 1.7.1 (you can find this in the 'About' dialog)
Package type: Flatpak
Operating system: Ubuntu 22.04
Hardware info: Intel i7-7700k, Nvidia GTX 1080, …
Expand Down
73 changes: 37 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "resources"
version = "1.7.0"
version = "1.7.1"
authors = ["nokyan <[email protected]>"]
edition = "2021"
rust-version = "1.80.0"
Expand All @@ -18,14 +18,14 @@ opt-level = 3

[dependencies]
adw = { version = "0.7.1", features = ["v1_6"], package = "libadwaita" }
anyhow = { version = "1.0.93", features = ["backtrace"] }
anyhow = { version = "1.0.94", features = ["backtrace"] }
async-channel = "2.3.1"
clap = { version = "4.5.21", features = ["derive"] }
clap = { version = "4.5.23", features = ["derive"] }
gettext-rs = { version = "0.7.2", features = ["gettext-system"] }
glob = "0.3.1"
gtk = { version = "0.9.4", features = ["v4_10"], package = "gtk4" }
lazy-regex = "3.3.0"
libc = { version = "0.2.162", features = ["extra_traits"] }
libc = { version = "0.2.167", features = ["extra_traits"] }
log = "0.4.22"
nix = { version = "0.29.0", default-features = false, features = [
"signal",
Expand Down
12 changes: 12 additions & 0 deletions data/net.nokyan.Resources.metainfo.xml.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@
</screenshot>
</screenshots>
<releases>
<release version="1.7.1" date="2024-12-06">
<url type="details">https://github.com/nokyan/resources/releases/tag/v1.7.1</url>
<description translate="no">
<p>
Resources 1.7.1 has been published including a hotfix for a critical bug and a small improvement for network interface detection:
</p>
<ul>
<li>GPU, encoder and decoder usage stats for NVIDIA GPUs were displayed as 0% most of the time</li>
<li>Improved detection for VPN tunnels</li>
</ul>
</description>
</release>
<release version="1.7.0" date="2024-11-29">
<url type="details">https://github.com/nokyan/resources/releases/tag/v1.7.0</url>
<description translate="no">
Expand Down
6 changes: 3 additions & 3 deletions lib/process_data/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "process-data"
version = "1.7.0"
version = "1.7.1"
authors = ["nokyan <[email protected]>"]
edition = "2021"
rust-version = "1.80.0"
Expand All @@ -17,10 +17,10 @@ strip = true
opt-level = 3

[dependencies]
anyhow = "1.0.93"
anyhow = "1.0.94"
glob = "0.3.1"
lazy-regex = "3.3.0"
libc = "0.2.166"
libc = "0.2.167"
num_cpus = "1.16.0"
nutype = { version = "0.5.0", features = ["serde"] }
nvml-wrapper = "0.10.0"
Expand Down
9 changes: 5 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'resources',
'rust',
version: '1.7.0',
version: '1.7.1',
meson_version: '>= 0.59',
)

Expand All @@ -13,7 +13,7 @@ base_id = 'net.nokyan.Resources'
dependency('glib-2.0', version: '>= 2.66')
dependency('gio-2.0', version: '>= 2.66')
dependency('gtk4', version: '>= 4.10.0')
dependency('libadwaita-1', version: '>= 1.5.0')
dependency('libadwaita-1', version: '>= 1.6.0')

glib_compile_resources = find_program('glib-compile-resources', required: true)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
Expand All @@ -37,10 +37,11 @@ gettext_package = meson.project_name()
if get_option('profile') == 'development'
profile = 'Devel'
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
if vcs_tag == ''
vcs_branch = run_command('git', 'rev-parse', '--abbrev-ref', 'HEAD').stdout().strip()
if vcs_tag == '' or vcs_branch == ''
version_suffix = '-devel'
else
version_suffix = '-@0@'.format(vcs_tag)
version_suffix = '-@0@/@1@'.format(vcs_branch, vcs_tag)
endif
application_id = '@0@.@1@'.format(base_id, profile)
else
Expand Down
18 changes: 9 additions & 9 deletions src/ui/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ mod imp {
use std::{cell::RefCell, collections::HashMap};

use crate::{
config::VERSION,
ui::{
pages::{
applications::ResApplications, cpu::ResCPU, memory::ResMemory,
Expand Down Expand Up @@ -159,6 +160,9 @@ mod imp {
// Devel Profile
if PROFILE == "Devel" {
obj.add_css_class("devel");
obj.set_title(Some(
&format!("{} ({})", obj.title().unwrap_or_default(), VERSION).trim(),
));
}

// Load latest window state
Expand Down Expand Up @@ -302,11 +306,9 @@ impl MainWindow {
}
}

fn init_gpu_pages(self: &MainWindow) -> Vec<Gpu> {
fn init_gpu_pages(self: &MainWindow, gpus: &[Gpu]) {
let imp = self.imp();

let gpus = Gpu::get_gpus().unwrap_or_default();

for (i, gpu) in gpus.iter().enumerate() {
let page = ResGPU::new();

Expand All @@ -330,8 +332,6 @@ impl MainWindow {
.borrow_mut()
.insert(gpu.pci_slot(), (gpu.clone(), added_page));
}

gpus
}

fn init_npu_pages(self: &MainWindow) -> Vec<Npu> {
Expand Down Expand Up @@ -372,6 +372,10 @@ impl MainWindow {

let gpus = Gpu::get_gpus().unwrap_or_default();

if !ARGS.disable_gpu_monitoring {
self.init_gpu_pages(&gpus);
}

imp.resources_sidebar.set_stack(&imp.content_stack);

if SETTINGS.show_search_on_start() {
Expand Down Expand Up @@ -419,10 +423,6 @@ impl MainWindow {
imp.memory.init();
}

if !ARGS.disable_gpu_monitoring {
self.init_gpu_pages();
}

if !ARGS.disable_npu_monitoring {
self.init_npu_pages();
}
Expand Down
Loading

0 comments on commit 42c1bc9

Please sign in to comment.