Notification time stamped 2021-03-31 20:33:59 UTC
From 6dfdd3a585f26888b1fca6fc5914a49002b3475e Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel(a)michel-slm.name>
Date: Apr 28 2020 17:40:19 +0000
Subject: Initial Fedora package
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9ebbb1e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/gnome-shell-extension-argos-3-fcb4751.tar.gz
diff --git a/argos-registerclass.patch b/argos-registerclass.patch
new file mode 100644
index 0000000..96b33c7
--- /dev/null
+++ b/argos-registerclass.patch
@@ -0,0 +1,139 @@
+From c4663d9d3e29ef33b7e9123ef0c095811c91cf5b Mon Sep 17 00:00:00 2001
+From: Ram Mehta <ram.mehta(a)gmail.com>
+Date: Sun, 8 Mar 2020 15:09:12 -0400
+Subject: [PATCH] Use registerClass to make plugin compatible with gnome 3.36.
+
+---
+ argos(a)pew.worldwidemann.com/menuitem.js | 101 +++++++++++++-----------
+ 1 file changed, 54 insertions(+), 47 deletions(-)
+
+diff --git a/argos(a)pew.worldwidemann.com/menuitem.js
b/argos(a)pew.worldwidemann.com/menuitem.js
+index e35811b..d5c248a 100644
+--- a/argos(a)pew.worldwidemann.com/menuitem.js
++++ b/argos(a)pew.worldwidemann.com/menuitem.js
+@@ -10,6 +10,7 @@
+ */
+
+ const Lang = imports.lang;
++const GObject = imports.gi.GObject;
+ const GLib = imports.gi.GLib;
+ const Gio = imports.gi.Gio;
+ const PopupMenu = imports.ui.popupMenu;
+@@ -18,64 +19,70 @@ const AltSwitcher = imports.ui.status.system.AltSwitcher;
+ const Extension = imports.misc.extensionUtils.getCurrentExtension();
+ const ArgosLineView = Extension.imports.lineview.ArgosLineView;
+
+-var ArgosMenuItem = class extends PopupMenu.PopupBaseMenuItem {
+- constructor(button, line, alternateLine) {
+- let hasAction = line.hasAction || (typeof alternateLine !== "undefined"
&& alternateLine.hasAction);
++// Menu entry representing a docker container
++const ArgosMenuItem = GObject.registerClass(
++ {
++ GTypeName: 'ArgosMenuItem'
++ },
++ class extends PopupMenu.PopupBaseMenuItem {
++ _init(button, line, alternateLine) {
++ let hasAction = line.hasAction || (typeof alternateLine !== "undefined"
&& alternateLine.hasAction);
+
+- super({
+- activate: hasAction,
+- hover: hasAction,
+- can_focus: hasAction
+- });
++ super._init({
++ activate: hasAction,
++ hover: hasAction,
++ can_focus: hasAction
++ });
+
+- let altSwitcher = null;
++ let altSwitcher = null;
+
+- let lineView = new ArgosLineView(line);
++ let lineView = new ArgosLineView(line);
+
+- if (typeof alternateLine === "undefined") {
+- this.actor.add_child(lineView);
+- } else {
+- let alternateLineView = new ArgosLineView(alternateLine);
+- altSwitcher = new AltSwitcher(lineView, alternateLineView);
+- lineView.visible = true;
+- alternateLineView.visible = true;
+- this.actor.add_child(altSwitcher.actor);
+- }
++ if (typeof alternateLine === "undefined") {
++ this.actor.add_child(lineView);
++ } else {
++ let alternateLineView = new ArgosLineView(alternateLine);
++ altSwitcher = new AltSwitcher(lineView, alternateLineView);
++ lineView.visible = true;
++ alternateLineView.visible = true;
++ this.actor.add_child(altSwitcher.actor);
++ }
+
+- if (hasAction) {
+- this.connect("activate", Lang.bind(this, function() {
+- let activeLine = (altSwitcher === null) ? line :
altSwitcher.actor.get_child().line;
++ if (hasAction) {
++ this.connect("activate", Lang.bind(this, function() {
++ let activeLine = (altSwitcher === null) ? line :
altSwitcher.actor.get_child().line;
+
+- if (activeLine.hasOwnProperty("href"))
+- Gio.AppInfo.launch_default_for_uri(activeLine.href, null);
++ if (activeLine.hasOwnProperty("href"))
++ Gio.AppInfo.launch_default_for_uri(activeLine.href, null);
+
+- if (activeLine.hasOwnProperty("eval"))
+- eval(activeLine.eval);
++ if (activeLine.hasOwnProperty("eval"))
++ eval(activeLine.eval);
+
+- if (activeLine.hasOwnProperty("bash")) {
+- let argv = [];
++ if (activeLine.hasOwnProperty("bash")) {
++ let argv = [];
+
+- if (activeLine.terminal === "false") {
+- argv = ["bash", "-c", activeLine.bash];
+- } else {
+- // Run shell immediately after executing the command to keep the terminal
window open
+- // (see
http://stackoverflow.com/q/3512055)
+- argv = ["gnome-terminal", "--", "bash",
"-c", activeLine.bash + "; exec ${SHELL:=bash}"];
+- }
++ if (activeLine.terminal === "false") {
++ argv = ["bash", "-c", activeLine.bash];
++ } else {
++ // Run shell immediately after executing the command to keep the terminal
window open
++ // (see
http://stackoverflow.com/q/3512055)
++ argv = ["gnome-terminal", "--", "bash",
"-c", activeLine.bash + "; exec ${SHELL:=bash}"];
++ }
+
+- let [success, pid] = GLib.spawn_async(
+- null, argv, null, GLib.SpawnFlags.SEARCH_PATH |
GLib.SpawnFlags.DO_NOT_REAP_CHILD, null);
++ let [success, pid] = GLib.spawn_async(
++ null, argv, null, GLib.SpawnFlags.SEARCH_PATH |
GLib.SpawnFlags.DO_NOT_REAP_CHILD, null);
+
+- if (success) {
+- GLib.child_watch_add(GLib.PRIORITY_DEFAULT_IDLE, pid, function() {
+- if (activeLine.refresh === "true")
+- button.update();
+- });
++ if (success) {
++ GLib.child_watch_add(GLib.PRIORITY_DEFAULT_IDLE, pid, function() {
++ if (activeLine.refresh === "true")
++ button.update();
++ });
++ }
++ } else if (activeLine.refresh === "true") {
++ button.update();
+ }
+- } else if (activeLine.refresh === "true") {
+- button.update();
+- }
+- }));
++ }));
++ }
+ }
+ }
+-};
++);
diff --git a/gnome-shell-extension-argos.spec b/gnome-shell-extension-argos.spec
new file mode 100644
index 0000000..5a6d78c
--- /dev/null
+++ b/gnome-shell-extension-argos.spec
@@ -0,0 +1,64 @@
+%global uuid argos(a)pew.worldwidemann.com
+
+%global commit fcb475140bd9d0b4b95279ce56c4c28f36fb29d6
+%global shortcommit fcb4751
+%global snapshot_date 20200110
+%global snapinfo %{snapshot_date}.%{shortcommit}
+
+Name: gnome-shell-extension-argos
+Version: 3
+Release: 2.%{snapinfo}%{?dist}
+Summary: Create GNOME Shell extensions in seconds
+
+License: GPLv3
+URL:
https://github.com/p-e-w/argos
+Source0: %{url}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+# Use registerClass for GNOME 3.36 compatibility
+#
https://github.com/p-e-w/argos/pull/111
+Patch0: %{url}/pull/111.patch#/argos-registerclass.patch
+
+BuildArch: noarch
+
+Requires: gnome-shell >= 3.36.0
+
+%description
+Most GNOME Shell extensions do one thing: Add a button with a dropdown menu to
+the panel, displaying information and exposing functionality. Even in its
+simplest form, creating such an extension is a nontrivial task involving a
+poorly documented and ever-changing JavaScript API.
+
+Argos lets you write GNOME Shell extensions in a language that every Linux user
+is already intimately familiar with: Bash scripts.
+
+More precisely, Argos is a GNOME Shell extension that turns executables'
+standard output into panel dropdown menus. It is inspired by, and fully
+compatible with, the BitBar app for macOS. Argos supports many BitBar plugins
+without modifications, giving you access to a large library of well-tested
+scripts in addition to being able to write your own.
+
+
+%prep
+%autosetup -p1 -n argos-%{commit}
+
+
+%build
+
+
+%install
+mkdir -p %{buildroot}/%{_datadir}/gnome-shell/extensions/
+cp -pr %{uuid} %{buildroot}%{_datadir}/gnome-shell/extensions/
+
+
+%files
+# asked upstream to include license text:
+#
https://github.com/p-e-w/argos/pull/115
+%doc README.md
+%{_datadir}/gnome-shell/extensions/%{uuid}/
+
+
+%changelog
+* Tue Apr 28 2020 Michel Alexandre Salim <salimma(a)fedoraproject.org> -
3.2.20200110.fcb4751
+- add URLs to pull requests for reference
+
+* Thu Apr 23 2020 Michel Alexandre Salim <salimma(a)fedoraproject.org> -
3-1.20200110.fcb4751
+- Initial Fedora package
diff --git a/sources b/sources
new file mode 100644
index 0000000..62f32e3
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (gnome-shell-extension-argos-3-fcb4751.tar.gz) =
061c3ca92301350e275f1ae48b61aeef70043cf28739eb36c47da5eb5d6ab28f72443b2f74b58698a5f4d4ae968754f7c4bfe0ee860ac774c3bca6585d2e7800
https://src.fedoraproject.org/rpms/gnome-shell-extension-argos/c/6dfdd3a5...