-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316000 from Nanotwerp/gnome-shell-extensions-fix
gnome.gnome-shell-extensions: patch `GTop` path for the builtin GNOME System Monitor extension
- Loading branch information
Showing
2 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
pkgs/desktops/gnome/core/gnome-shell-extensions/fix_gtop.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/extensions/system-monitor/extension.js b/extensions/system-monitor/extension.js | ||
index 37d2eb1..232d0d5 100644 | ||
--- a/extensions/system-monitor/extension.js | ||
+++ b/extensions/system-monitor/extension.js | ||
@@ -6,9 +6,9 @@ | ||
|
||
import Clutter from 'gi://Clutter'; | ||
import Gio from 'gi://Gio'; | ||
+import GIRepository from "gi://GIRepository"; | ||
import GLib from 'gi://GLib'; | ||
import GObject from 'gi://GObject'; | ||
-import GTop from 'gi://GTop'; | ||
import Pango from 'gi://Pango'; | ||
import Shell from 'gi://Shell'; | ||
import St from 'gi://St'; | ||
@@ -19,6 +19,9 @@ import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; | ||
|
||
import * as Main from 'resource:///org/gnome/shell/ui/main.js'; | ||
|
||
+GIRepository.Repository.prepend_search_path('@gtop_path@'); | ||
+const GTop = (await import("gi://GTop")).default; | ||
+ | ||
const THRESHOLD_HIGH = 0.80; | ||
|
||
// adapted from load-graph.cpp in gnome-system-monitor |