Skip to content

Commit

Permalink
Merge pull request #147542: gnomeExtensions.pop-shell: init
Browse files Browse the repository at this point in the history
  • Loading branch information
piegamesde authored Dec 1, 2021
2 parents e89d789 + 753c1f5 commit 461a7d2
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/desktops/gnome/extensions/manuallyPackaged.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"[email protected]" = callPackage ./no-title-bar { };
"paperwm@hedning:matrix.org" = callPackage ./paperwm { };
"pidgin@muffinmad" = callPackage ./pidgin-im-integration { };
"[email protected]" = callPackage ./pop-shell { };
"[email protected]" = callPackage ./sound-output-device-chooser { };
"[email protected]" = callPackage ./system-monitor { };
"[email protected]" = callPackage ./taskwhisperer { };
Expand Down
36 changes: 36 additions & 0 deletions pkgs/desktops/gnome/extensions/pop-shell/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ stdenv, lib, fetchFromGitHub, glib, nodePackages, gjs }:

stdenv.mkDerivation rec {
pname = "gnome-shell-extension-pop-shell";
version = "unstable-2021-11-30";

src = fetchFromGitHub {
owner = "pop-os";
repo = "shell";
rev = "4b65ee865d01436ec75a239a0586a2fa6051b8c3";
sha256 = "DHmp3kzBgbyxRe0TjER/CAqyUmD9LeRqAFQ9apQDzfk=";
};

nativeBuildInputs = [ glib nodePackages.typescript gjs ];

buildInputs = [ gjs ];

patches = [
./fix-gjs.patch
];

makeFlags = [ "XDG_DATA_HOME=$(out)/share" ];

passthru = {
extensionUuid = "[email protected]";
extensionPortalSlug = "pop-shell";
};

meta = with lib; {
description = "Keyboard-driven layer for GNOME Shell";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = [ maintainers.genofire ];
homepage = "https://github.com/pop-os/shell";
};
}
67 changes: 67 additions & 0 deletions pkgs/desktops/gnome/extensions/pop-shell/fix-gjs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
diff --git a/src/color_dialog/src/main.ts b/src/color_dialog/src/main.ts
index 9522499..9911530 100644
--- a/src/color_dialog/src/main.ts
+++ b/src/color_dialog/src/main.ts
@@ -1,4 +1,4 @@
-#!/usr/bin/gjs
+#!/usr/bin/env gjs

imports.gi.versions.Gtk = '3.0';

@@ -84,4 +84,4 @@ function launch_color_dialog() {

Gtk.init(null);

-launch_color_dialog()
\ No newline at end of file
+launch_color_dialog()
diff --git a/src/extension.ts b/src/extension.ts
index 7417c46..00d5829 100644
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -534,7 +534,7 @@ export class Ext extends Ecs.System<ExtEvent> {
return true
}

- const ipc = utils.async_process_ipc(["gjs", path])
+ const ipc = utils.async_process_ipc([path])

if (ipc) {
const generator = (stdout: any, res: any) => {
diff --git a/src/floating_exceptions/src/main.ts b/src/floating_exceptions/src/main.ts
index f298ec7..87a6bc4 100644
--- a/src/floating_exceptions/src/main.ts
+++ b/src/floating_exceptions/src/main.ts
@@ -1,4 +1,4 @@
-#!/usr/bin/gjs
+#!/usr/bin/env gjs

imports.gi.versions.Gtk = '3.0'

@@ -329,4 +329,4 @@ function main() {
Gtk.main()
}

-main()
\ No newline at end of file
+main()
diff --git a/src/panel_settings.ts b/src/panel_settings.ts
index 83ff56c..1bc1e98 100644
--- a/src/panel_settings.ts
+++ b/src/panel_settings.ts
@@ -338,7 +338,7 @@ function color_selector(ext: Ext, menu: any) {
color_selector_item.add_child(color_button);
color_button.connect('button-press-event', () => {
let path = Me.dir.get_path() + "/color_dialog/main.js";
- let resp = GLib.spawn_command_line_async(`gjs ${path}`);
+ let resp = GLib.spawn_command_line_async(path);
if (!resp) {

return null;
@@ -353,4 +353,4 @@ function color_selector(ext: Ext, menu: any) {
});

return color_selector_item;
-}
\ No newline at end of file
+}

0 comments on commit 461a7d2

Please sign in to comment.