summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrantic10482019-11-28 13:49:26 +0800
committerfrantic10482019-11-28 13:49:26 +0800
commitd9b0a0e2092ff8171b8b84740294881ec5ff51ee (patch)
tree511316778e821b52470afc80ead86428c25187f8
parent8632c56c692d5b934bc6804bf99009385160fd36 (diff)
downloadaur-d9b0a0e2092ff8171b8b84740294881ec5ff51ee.tar.gz
upgpkg: code-transparent 1.40.1-1
upstream release
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD31
-rw-r--r--code.sh2
-rw-r--r--transparent.diff104
4 files changed, 78 insertions, 69 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bc922222e05b..3b657749c882 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = code-transparent
pkgdesc = The Open Source build of Visual Studio Code (vscode) editor - with transparency enabled.
- pkgver = 1.39.2
+ pkgver = 1.40.1
pkgrel = 1
url = https://github.com/microsoft/vscode
install = code-transparent.install
@@ -12,7 +12,7 @@ pkgbase = code-transparent
makedepends = python2
makedepends = yarn
makedepends = nodejs-lts-dubnium
- depends = electron4
+ depends = electron6
depends = libsecret
depends = libx11
depends = libxkbfile
@@ -21,7 +21,7 @@ pkgbase = code-transparent
optdepends = zsh-completions: ZSH completitons
provides = code
conflicts = code
- source = code::git+https://github.com/Microsoft/vscode.git#tag=1.39.2
+ source = code::git+https://github.com/Microsoft/vscode.git#tag=1.40.1
source = code.js
source = code.sh
source = product_json.diff
@@ -29,10 +29,10 @@ pkgbase = code-transparent
source = transparent.diff
sha512sums = SKIP
sha512sums = 814c9554427183cd893a33cd2cbe91f6e0ea71921ef0717c86217b1d3058d265f9ff7a9ace3e7b76f122e60b7686475cf4d999e581a1845face3033afb9f745f
- sha512sums = dfd9ca38e6510c9ad59fb24c1141fdfeb136f457392aee79b0bc2ff378c4c54d81a06728ba3ec4039d57dfcd730c26686585de9b4032a21ee8151a4f05195c15
+ sha512sums = 0e75ee88274cbaf48c59ef6f363f6b8ac2ea83f8b17a61155008db773b709a1f0233754fa63a136ec0417313ba90a7eb17db000ec22a38ca8840d8ba6c47cab1
sha512sums = 8ec47e497287d67f37e7b669af416f43d5cdbd4574892867d7b95996ef5de53640b5bc919b06b177e1fd91cb005579d6ed0c17325117b9914ba7cf28f5f06e40
sha512sums = b267dcedaf51067a782d0f14007663b706973c1538f7fb91f093475134c2145fd0ffd5ed2b47ad7f01c6167a78a4af285d2818d7850fc67a7f7a473324824664
- sha512sums = 09e417a861d8c84855714253a65aeb954575a1ca51f5ef0fc6bc2aaa6fee9ba507325ce9ed2d450ba070d461456ef5fa60993ac68fc89f21c7d2f9ebe6631266
+ sha512sums = 2c1ac7f17399fddfb8330f8f05a79cb27d5e15180ced60400d5abae75207ce4f6c9684054e3b7cde549376782349350bfae71f3191f0cf25b64885bf2e2d3e8f
pkgname = code-transparent
diff --git a/PKGBUILD b/PKGBUILD
index a8d627c9a55f..eb86248d907b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,12 +11,13 @@ pkgdesc='The Open Source build of Visual Studio Code (vscode) editor - with tran
# - carbon: 8
# - dubnium: 10
# Important: Remember to check https://github.com/microsoft/vscode/blob/master/.yarnrc (choose correct tag) for target electron version
-pkgver=1.39.2
+_electron=electron6
+pkgver=1.40.1
pkgrel=1
arch=('x86_64')
url='https://github.com/microsoft/vscode'
license=('MIT')
-depends=('electron4' 'libsecret' 'libx11' 'libxkbfile' 'ripgrep')
+depends=($_electron 'libsecret' 'libx11' 'libxkbfile' 'ripgrep')
optdepends=('bash-completion: Bash completions'
'zsh-completions: ZSH completitons')
makedepends=('git' 'gulp' 'npm' 'python2' 'yarn' 'nodejs-lts-dubnium')
@@ -31,10 +32,10 @@ source=("$_pkgname::git+https://github.com/Microsoft/vscode.git#tag=$pkgver"
'transparent.diff')
sha512sums=('SKIP'
'814c9554427183cd893a33cd2cbe91f6e0ea71921ef0717c86217b1d3058d265f9ff7a9ace3e7b76f122e60b7686475cf4d999e581a1845face3033afb9f745f'
- 'dfd9ca38e6510c9ad59fb24c1141fdfeb136f457392aee79b0bc2ff378c4c54d81a06728ba3ec4039d57dfcd730c26686585de9b4032a21ee8151a4f05195c15'
+ '0e75ee88274cbaf48c59ef6f363f6b8ac2ea83f8b17a61155008db773b709a1f0233754fa63a136ec0417313ba90a7eb17db000ec22a38ca8840d8ba6c47cab1'
'8ec47e497287d67f37e7b669af416f43d5cdbd4574892867d7b95996ef5de53640b5bc919b06b177e1fd91cb005579d6ed0c17325117b9914ba7cf28f5f06e40'
'b267dcedaf51067a782d0f14007663b706973c1538f7fb91f093475134c2145fd0ffd5ed2b47ad7f01c6167a78a4af285d2818d7850fc67a7f7a473324824664'
- '09e417a861d8c84855714253a65aeb954575a1ca51f5ef0fc6bc2aaa6fee9ba507325ce9ed2d450ba070d461456ef5fa60993ac68fc89f21c7d2f9ebe6631266')
+ '2c1ac7f17399fddfb8330f8f05a79cb27d5e15180ced60400d5abae75207ce4f6c9684054e3b7cde549376782349350bfae71f3191f0cf25b64885bf2e2d3e8f')
# Even though we don't officially support other archs, let's
# allow the user to use this PKGBUILD to compile the package
@@ -58,6 +59,9 @@ esac
prepare() {
cd $_pkgname
+ # Change electron binary name to the target electron
+ sed -i "s|exec electron |exec $_electron |" ../code.sh
+
# This patch no longer contains proprietary modifications.
# See https://github.com/Microsoft/vscode/issues/31168 for details.
patch -p0 < ../product_json.diff
@@ -75,7 +79,7 @@ prepare() {
patch -p1 < ../enable-proposed-apis.diff
# Build native modules for system electron
- local _target=$(</usr/lib/electron4/version)
+ local _target=$(</usr/lib/$_electron/version)
sed -i "s/^target .*/target \"${_target//v/}\"/" .yarnrc
# Patch appdata and desktop file
@@ -89,11 +93,13 @@ prepare() {
s|@@URLPROTOCOL@@|vscode|g
s|inode/directory;||' resources/linux/code{.appdata.xml,.desktop,-url-handler.desktop}
- # Add missing exectable name to bash completion
- sed -i 's|complete -F _code code|complete -F _code code code-oss|' resources/completions/bash/code
- # Create new zsh completion file for our binary
+ # Add completitions for code-oss
+ cp resources/completions/bash/code resources/completions/bash/code-oss
cp resources/completions/zsh/_code resources/completions/zsh/_code-oss
- sed -i 's|#compdef code|#compdef code code-oss|' resources/completions/zsh/_code-oss
+
+ # Patch completitions with correct names
+ sed -i 's|@@APPNAME@@|code|g' resources/completions/{bash/code,zsh/_code}
+ sed -i 's|@@APPNAME@@|code-oss|g' resources/completions/{bash/code-oss,zsh/_code-oss}
# Fix bin path
sed -i "s|return path.join(path.dirname(execPath), 'bin', \`\${product.applicationName}\`);|return '/usr/bin/code';|g
@@ -132,7 +138,7 @@ package() {
install -dm 755 "$pkgdir"/usr/lib/$_pkgname
cp -r --no-preserve=ownership --preserve=mode VSCode-linux-$_vscode_arch/resources/app/* "$pkgdir"/usr/lib/$_pkgname/
- # replace statically included binary with system copy
+ # Replace statically included binary with system copy
ln -sf /usr/bin/rg "$pkgdir"/usr/lib/code/node_modules.asar.unpacked/vscode-ripgrep/bin/rg
# Install binary
@@ -147,8 +153,9 @@ package() {
install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/resources/linux/code.png "$pkgdir"/usr/share/pixmaps/code-oss.png
# Install bash and zsh completions
- install -Dm 644 $_pkgname/resources/completions/bash/code "$pkgdir"/usr/share/bash-completion/completions/code-oss
- ln -s code-oss "$pkgdir"/usr/share/bash-completion/completions/code
+ install -Dm 644 $_pkgname/resources/completions/bash/code "$pkgdir"/usr/share/bash-completion/completions/code
+ install -Dm 644 $_pkgname/resources/completions/bash/code-oss "$pkgdir"/usr/share/bash-completion/completions/code-oss
+ install -Dm 644 $_pkgname/resources/completions/zsh/_code "$pkgdir"/usr/share/zsh/site-functions/_code
install -Dm 644 $_pkgname/resources/completions/zsh/_code-oss "$pkgdir"/usr/share/zsh/site-functions/_code-oss
# Install license files
diff --git a/code.sh b/code.sh
index ac10a8490cbb..aaa40c3c9e50 100644
--- a/code.sh
+++ b/code.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-ELECTRON_RUN_AS_NODE=1 exec electron4 /usr/lib/code/out/cli.js /usr/lib/code/code.js "$@"
+ELECTRON_RUN_AS_NODE=1 exec electron /usr/lib/code/out/cli.js /usr/lib/code/code.js "$@"
diff --git a/transparent.diff b/transparent.diff
index 3b4a9b08306f..ea276d46a910 100644
--- a/transparent.diff
+++ b/transparent.diff
@@ -1,10 +1,10 @@
-
-diff -ru a/src/main.js b/src/main.js
---- a/src/main.js 2019-10-21 15:16:40.287933959 +0800
-+++ b/src/main.js 2019-10-21 14:24:16.491539975 +0800
-@@ -142,6 +142,9 @@
- // Force pre-Chrome-60 color profile handling (for https://github.com/Microsoft/vscode/issues/51791)
- app.commandLine.appendSwitch('disable-color-correct-rendering');
+diff --git a/src/main.js b/src/main.js
+index d5f4c90..5e4dba7 100644
+--- a/src/main.js
++++ b/src/main.js
+@@ -157,6 +157,9 @@ function configureCommandlineSwitchesSync(cliArgs) {
+ }
+ });
+ // enable transparent
+ app.commandLine.appendSwitch('enable-transparent-visuals');
@@ -12,32 +12,33 @@ diff -ru a/src/main.js b/src/main.js
// Support JS Flags
const jsFlags = getJSFlags(cliArgs);
if (jsFlags) {
-diff -ru a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts
---- a/src/vs/code/electron-main/window.ts 2019-10-21 15:16:40.304601230 +0800
-+++ b/src/vs/code/electron-main/window.ts 2019-10-21 15:14:08.935088758 +0800
-@@ -121,7 +121,8 @@
- height: this.windowState.height,
- x: this.windowState.x,
- y: this.windowState.y,
-- backgroundColor: this.themeMainService.getBackgroundColor(),
-+ transparent: true,
-+ backgroundColor: '#00000000' || this.themeMainService.getBackgroundColor(),
- minWidth: CodeWindow.MIN_WIDTH,
- minHeight: CodeWindow.MIN_HEIGHT,
- show: !isFullscreenOrMaximized,
-diff -ru a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts
---- a/src/vs/workbench/common/theme.ts 2019-10-21 23:14:46.424664135 +0800
-+++ b/src/vs/workbench/common/theme.ts 2019-10-21 23:15:24.641792763 +0800
-@@ -7,20 +7,25 @@
- import { registerColor, editorBackground, contrastBorder, transparent, editorWidgetBackground, textLinkForeground, lighten, darken, focusBorder, activeContrastBorder, editorWidgetForeground } from 'vs/platform/theme/common/colorRegistry';
+diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts
+index b55f409..8c61319 100644
+--- a/src/vs/code/electron-main/window.ts
++++ b/src/vs/code/electron-main/window.ts
+@@ -122,7 +122,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
+ height: this.windowState.height,
+ x: this.windowState.x,
+ y: this.windowState.y,
+- backgroundColor: this.themeMainService.getBackgroundColor(),
++ transparent: true,
++ backgroundColor: '#00000000' || this.themeMainService.getBackgroundColor(),
+ minWidth: CodeWindow.MIN_WIDTH,
+ minHeight: CodeWindow.MIN_HEIGHT,
+ show: !isFullscreenOrMaximized,
+diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts
+index 188874a..5769904 100644
+--- a/src/vs/workbench/common/theme.ts
++++ b/src/vs/workbench/common/theme.ts
+@@ -7,20 +7,24 @@ import * as nls from 'vs/nls';
+ import { registerColor, editorBackground, contrastBorder, transparent, editorWidgetBackground, textLinkForeground, lighten, darken, focusBorder, activeContrastBorder, editorWidgetForeground, editorErrorForeground, editorWarningForeground, editorInfoForeground } from 'vs/platform/theme/common/colorRegistry';
import { Disposable } from 'vs/base/common/lifecycle';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
-import { Color } from 'vs/base/common/color';
+import { Color, RGBA } from 'vs/base/common/color';
-
--// < --- Workbench (not customizable) --- >
-+// < --- Workbench --- >
-
+
+ // < --- Workbench (not customizable) --- >
+
-export function WORKBENCH_BACKGROUND(theme: ITheme): Color {
- switch (theme.type) {
- case 'dark':
@@ -48,31 +49,32 @@ diff -ru a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts
- return Color.fromHex('#000000');
- }
-}
-+export const WORKBENCH_BACKGROUND = (theme: ITheme) =>
-+ theme.getColor(
-+ registerColor(
-+ 'workbench.background',
-+ {
-+ dark: '#252526',
-+ light: '#F3F3F3',
-+ hc: '#000000'
-+ },
-+ nls.localize(
-+ 'workbenchBackground',
-+ 'Top-level background color. Not seen unless other elements have a transparent color.'
-+ )
++export const WORKBENCH_BACKGROUND = (theme: ITheme) => theme.getColor(
++ registerColor(
++ 'workbench.background',
++ {
++ dark: '#252526',
++ light: '#F3F3F3',
++ hc: '#000000'
++ },
++ nls.localize(
++ 'workbenchBackground',
++ 'Top-level background color. Not seen unless other elements have a transparent color.'
+ )
-+ ) || new Color(new RGBA(0, 0, 0, 0));
-
++ )
++) || new Color(new RGBA(0, 0, 0, 0));
+
// < --- Tabs --- >
-
---- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts 2019-10-22 10:40:29.212561275 +0800
-+++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts 2019-10-22 10:41:08.469016308 +0800
-@@ -469,6 +469,7 @@
+
+diff --git a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
+index 373f411..16d74ca 100644
+--- a/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
++++ b/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
+@@ -466,6 +466,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
macOptionIsMeta: config.macOptionIsMeta,
macOptionClickForcesSelection: config.macOptionClickForcesSelection,
rightClickSelectsWord: config.rightClickBehavior === 'selectWord',
+ allowTransparency: true,
- // TODO: Guess whether to use canvas or dom better
- rendererType: config.rendererType === 'auto' ? 'canvas' : config.rendererType
- });
+ fastScrollModifier: 'alt',
+ fastScrollSensitivity: editorOptions.fastScrollSensitivity,
+ scrollSensitivity: editorOptions.mouseWheelScrollSensitivity,