Noah Vogt vor 1 Jahr
Ursprung
Commit
ac384387bf
4 geänderte Dateien mit 145 neuen und 6 gelöschten Zeilen
  1. 76 0
      .SRCINFO
  2. 5 0
      .gitignore
  3. 12 6
      PKGBUILD
  4. 52 0
      disable-screenshot-notification.patch

+ 76 - 0
.SRCINFO

@@ -0,0 +1,76 @@
+pkgbase = gnome-shell-no-screenshot-notification
+	pkgdesc = Next generation desktop shell - without the screenshot notification
+	pkgver = 44.5
+	pkgrel = 1
+	epoch = 1
+	url = https://wiki.gnome.org/Projects/GnomeShell
+	arch = x86_64
+	groups = gnome
+	license = GPL
+	checkdepends = appstream-glib
+	checkdepends = python-dbusmock
+	checkdepends = xorg-server-xvfb
+	makedepends = asciidoc
+	makedepends = bash-completion
+	makedepends = evolution-data-server
+	makedepends = git
+	makedepends = gnome-control-center
+	makedepends = gobject-introspection
+	makedepends = gtk-doc
+	makedepends = meson
+	makedepends = sassc
+	depends = accountsservice
+	depends = gcr-4
+	depends = gjs
+	depends = gnome-autoar
+	depends = gnome-session
+	depends = gnome-settings-daemon
+	depends = gsettings-desktop-schemas
+	depends = gtk4
+	depends = libadwaita
+	depends = libcanberra-pulse
+	depends = libgdm
+	depends = libgweather-4
+	depends = libibus
+	depends = libnma-gtk4
+	depends = libsecret
+	depends = libsoup3
+	depends = mutter
+	depends = unzip
+	depends = upower
+	optdepends = evolution-data-server: Evolution calendar integration
+	optdepends = gnome-bluetooth-3.0: Bluetooth support
+	optdepends = gnome-control-center: System settings
+	optdepends = gnome-disk-utility: Mount with keyfiles
+	optdepends = gst-plugin-pipewire: Screen recording
+	optdepends = gst-plugins-good: Screen recording
+	optdepends = power-profiles-daemon: Power profile switching
+	optdepends = switcheroo-control: Multi-GPU support
+	source = git+https://gitlab.gnome.org/GNOME/gnome-shell.git#commit=d49cc6fa355d59d3a4c878ae89885cb1c571bfda
+	source = git+https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
+	source = disable-screenshot-notification.patch
+	b2sums = SKIP
+	b2sums = SKIP
+	b2sums = a26f59d20480a4360e8e6f281d5e0576784801fdd635a2addd5cf0b06da567387b33a3ba869865672f55a5766b02cc1ebebaf7dcc30bd0e139122c8719083863
+
+pkgname = gnome-shell-no-screenshot-notification
+	depends = accountsservice
+	depends = gcr-4
+	depends = gjs
+	depends = gnome-autoar
+	depends = gnome-session
+	depends = gnome-settings-daemon
+	depends = gsettings-desktop-schemas
+	depends = gtk4
+	depends = libadwaita
+	depends = libcanberra-pulse
+	depends = libgdm
+	depends = libgweather-4
+	depends = libibus
+	depends = libnma-gtk4
+	depends = libsecret
+	depends = libsoup3
+	depends = mutter
+	depends = unzip
+	depends = upower
+	depends = libmutter-12.so

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+gnome-shell/
+libgnome-volume-control/
+src/
+pkg/
+*.zst

+ 12 - 6
PKGBUILD

@@ -1,12 +1,14 @@
+# Maintainer: Noah Vogt <noah@noahvogt.com>
 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
 # Contributor: Ionut Biru <ibiru@archlinux.org>
 # Contributor: Flamelab <panosfilip@gmail.com
 
-pkgname=gnome-shell
+_base_name=gnome-shell
+pkgname=gnome-shell-no-screenshot-notification
 pkgver=44.5
 pkgrel=1
 epoch=1
-pkgdesc="Next generation desktop shell"
+pkgdesc="Next generation desktop shell - without the screenshot notification"
 url="https://wiki.gnome.org/Projects/GnomeShell"
 arch=(x86_64)
 license=(GPL)
@@ -62,17 +64,21 @@ _commit=d49cc6fa355d59d3a4c878ae89885cb1c571bfda  # tags/44.5^0
 source=(
   "git+https://gitlab.gnome.org/GNOME/gnome-shell.git#commit=$_commit"
   "git+https://gitlab.gnome.org/GNOME/libgnome-volume-control.git"
+  "disable-screenshot-notification.patch"
 )
 b2sums=('SKIP'
-        'SKIP')
+        'SKIP'
+        'a26f59d20480a4360e8e6f281d5e0576784801fdd635a2addd5cf0b06da567387b33a3ba869865672f55a5766b02cc1ebebaf7dcc30bd0e139122c8719083863')
 
 pkgver() {
-  cd $pkgname
+  cd $_base_name
   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
 }
 
 prepare() {
-  cd $pkgname
+  cd $_base_name
+
+  patch -p1 -i "$srcdir/disable-screenshot-notification.patch"
 
   git submodule init
   git submodule set-url subprojects/gvc "$srcdir/libgnome-volume-control"
@@ -87,7 +93,7 @@ build() {
   CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
   LDFLAGS+=" -Wl,-Bsymbolic-functions"
 
-  arch-meson $pkgname build "${meson_options[@]}"
+  arch-meson $_base_name build "${meson_options[@]}"
   meson compile -C build
 }
 

+ 52 - 0
disable-screenshot-notification.patch

@@ -0,0 +1,52 @@
+--- a/js/ui/screenshot.js
++++ b/js/ui/screenshot.js
+@@ -2184,48 +2184,7 @@ function _storeScreenshot(bytes, pixbuf) {
+         pixbuf.rowstride
+     );
+
+-    // Show a notification.
+-    const source = new MessageTray.Source(
+-        // Translators: notification source name.
+-        _('Screenshot'),
+-        'screenshot-recorded-symbolic'
+-    );
+-    const notification = new MessageTray.Notification(
+-        source,
+-        // Translators: notification title.
+-        _('Screenshot captured'),
+-        // Translators: notification body when a screenshot was captured.
+-        _('You can paste the image from the clipboard.'),
+-        { datetime: time, gicon: content }
+-    );
+-
+-    if (!disableSaveToDisk) {
+-        // Translators: button on the screenshot notification.
+-        notification.addAction(_('Show in Files'), () => {
+-            const app =
+-                Gio.app_info_get_default_for_type('inode/directory', false);
+-
+-            if (app === null) {
+-                // It may be null e.g. in a toolbox without nautilus.
+-                log('Error showing in files: no default app set for inode/directory');
+-                return;
+-            }
+-
+-            app.launch([file], global.create_app_launch_context(0, -1));
+-        });
+-        notification.connect('activated', () => {
+-            try {
+-                Gio.app_info_launch_default_for_uri(
+-                    file.get_uri(), global.create_app_launch_context(0, -1));
+-            } catch (err) {
+-                logError(err, 'Error opening screenshot');
+-            }
+-        });
+-    }
+-
+-    notification.setTransient(true);
+-    Main.messageTray.add(source);
+-    source.showNotification(notification);
++    // patched: do not show a notification after taking a screenshot
+ }
+
+ /**