diff --git a/.SRCINFO b/.SRCINFO index 2a71ee3..23b1f68 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -33,9 +33,11 @@ pkgbase = google-chrome-beta source = google-chrome-beta_54.0.2840.50_amd64.deb::https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb source = https://www.google.com/chrome/browser/privacy/eula_text.html source = google-chrome-beta.sh + source = StartupWMClass_and_GNOME3-context-menu.patch md5sums = 38a1b628c32e494da9170cc73facfc7f md5sums = SKIP md5sums = ca16d5162eed85b1ba4e6b9fc37f9e35 + md5sums = 1cc8a4f5310d51234973ca5bbb8d75ae pkgname = google-chrome-beta diff --git a/PKGBUILD b/PKGBUILD index 0b9e6ca..781f3f7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -22,10 +22,12 @@ install=$pkgname.install _channel=beta source=("google-chrome-${_channel}_${pkgver}_amd64.deb::https://dl.google.com/linux/direct/google-chrome-${_channel}_current_amd64.deb" "$url/browser/privacy/eula_text.html" - 'google-chrome-beta.sh') + 'google-chrome-beta.sh' + 'StartupWMClass_and_GNOME3-context-menu.patch') md5sums=('38a1b628c32e494da9170cc73facfc7f' 'SKIP' - 'ca16d5162eed85b1ba4e6b9fc37f9e35') + 'ca16d5162eed85b1ba4e6b9fc37f9e35' + '1cc8a4f5310d51234973ca5bbb8d75ae') package() { msg2 "Extracting the data.tar.xz..." @@ -47,10 +49,14 @@ package() { # License install -Dm644 eula_text.html "$pkgdir"/usr/share/licenses/google-chrome-$_channel/eula_text.html - msg2 "Fixing Chrome icon resolution..." - sed -i "/Exec=/i\StartupWMClass=Google-chrome-$_channel" "$pkgdir"/usr/share/applications/google-chrome-$_channel.desktop + #msg2 "Fixing Chrome icon resolution..." + #sed -i "/Exec=/i\StartupWMClass=Google-chrome-$_channel" "$pkgdir"/usr/share/applications/google-chrome-$_channel.desktop - msg2 "Removing unnecessities (e.g. Debian Cron job)..." + msg2 "Fixing Chrome icon resolution and GNOME 3 context menu..." + cd "$pkgdir" + patch -p0 -i "$srcdir"/StartupWMClass_and_GNOME3-context-menu.patch + + msg2 "Removing Debian Cron job and duplicate product logos..." rm -r "$pkgdir"/etc/cron.daily/ "$pkgdir"/opt/google/chrome-$_channel/cron/ rm "$pkgdir"/opt/google/chrome-$_channel/product_logo_*.png } diff --git a/StartupWMClass_and_GNOME3-context-menu.patch b/StartupWMClass_and_GNOME3-context-menu.patch new file mode 100644 index 0000000..5a5772a --- /dev/null +++ b/StartupWMClass_and_GNOME3-context-menu.patch @@ -0,0 +1,29 @@ +diff -ur usr/share/applications/google-chrome-beta.desktop usr-patched/share/applications/google-chrome-beta.desktop +--- usr/share/applications/google-chrome-beta.desktop 2016-10-05 06:42:08.000000000 +0300 ++++ usr-patched/share/applications/google-chrome-beta.desktop 2016-10-09 17:00:23.864348500 +0300 +@@ -105,6 +105,7 @@ + Comment[zh_CN]=访问互联网 + Comment[zh_HK]=連線到網際網路 + Comment[zh_TW]=連線到網際網路 ++StartupWMClass=Google-chrome-beta + Exec=/usr/bin/google-chrome-beta %U + Terminal=false + Icon=google-chrome-beta +@@ -112,6 +113,17 @@ + Categories=Network;WebBrowser; + MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp; + X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito ++Actions=new-window;new-private-window; ++ ++[Desktop Action new-window] ++Name=New Window ++StartupWMClass=Google-chrome-beta ++Exec=/usr/bin/google-chrome-beta ++ ++[Desktop Action new-private-window] ++Name=New Private Window ++StartupWMClass=Google-chrome-beta ++Exec=/usr/bin/google-chrome-beta --incognito + + [NewWindow Shortcut Group] + Name=New Window