summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrany2021-01-01 01:27:10 +0200
committerrany2021-01-01 01:28:57 +0200
commit6e425758b15a8eeed51d01d9e63e568c42dacd43 (patch)
tree8780a17b98ecd87fce72a85fc08dca546fc21ca7
parent06f3debde451a8ce56e7c490941dc0bc9bdb666d (diff)
downloadaur-6e425758b15a8eeed51d01d9e63e568c42dacd43.tar.gz
Update
update
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD12
-rwxr-xr-xglowing-bear.sh6
-rw-r--r--index.js47
5 files changed, 19 insertions, 60 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 36c89a09b969..f6d08e1bcbd6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = glowing-bear-electron
pkgdesc = A web client for Weechat (Electron version)
pkgver = 0.9.0
- pkgrel = 3
+ pkgrel = 4
url = https://www.glowing-bear.org/
arch = any
groups = irc
@@ -12,10 +12,8 @@ pkgbase = glowing-bear-electron
depends = glowing-bear-web
source = glowing-bear.desktop
source = glowing-bear.sh
- source = index.js
- sha256sums = 8e8f5c38849a8e76e0f217c38c24b5b6b297b7c644ea3513ea80a5ac39787424
- sha256sums = 6f629478fc412719c7200b43a360aceafdabc58a76016cba66cc41188d86e5bf
- sha256sums = 5104282cf97cdc605d562d553b564040b9872627e1651ea005459b30f7f86bea
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = glowing-bear-electron
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..92d23adf2ad6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+**
+!glowing-bear.desktop
+!glowing-bear.sh
+!index.js
+!PKGBUILD
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index 8e3d2a9e626c..7d748cc1dc86 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: rany <rany@disroot.org>
pkgname=glowing-bear-electron
pkgver=0.9.0
-pkgrel=3
+pkgrel=4
pkgdesc="A web client for Weechat (Electron version)"
arch=(any)
url="https://www.glowing-bear.org/"
@@ -10,11 +10,9 @@ groups=(irc weechat)
depends=(electron glowing-bear-web)
makedepends=(librsvg)
source=("glowing-bear.desktop"
- "glowing-bear.sh"
- "index.js")
-sha256sums=("8e8f5c38849a8e76e0f217c38c24b5b6b297b7c644ea3513ea80a5ac39787424"
- "6f629478fc412719c7200b43a360aceafdabc58a76016cba66cc41188d86e5bf"
- "5104282cf97cdc605d562d553b564040b9872627e1651ea005459b30f7f86bea")
+ "glowing-bear.sh")
+sha256sums=("SKIP"
+ "SKIP")
package() {
# Register the binary as glowing-bear
@@ -31,8 +29,6 @@ package() {
done
# Setup /usr/lib/glowing-bear
- mkdir -p "${pkgdir}/usr/lib/glowing-bear"
- install -Dm644 "$srcdir/index.js" "${pkgdir}/usr/lib/glowing-bear"
ln -sf /usr/share/webapps/glowing-bear "${pkgdir}/usr/lib/glowing-bear/webapp"
# Add the .desktop file
diff --git a/glowing-bear.sh b/glowing-bear.sh
index 3fbef6ab943e..87b23170470a 100755
--- a/glowing-bear.sh
+++ b/glowing-bear.sh
@@ -1,2 +1,8 @@
#!/bin/bash
+
+# workaround for init.json issue
+cd "$HOME/.config/glowing-bear"
+mkdir -p "$HOME/.config/glowing-bear"
+
+# start electron glowing-bear
exec electron /usr/lib/glowing-bear/index.js "${@}"
diff --git a/index.js b/index.js
deleted file mode 100644
index 6589bb87affe..000000000000
--- a/index.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Modules to control application life and create native browser window
-const {app, BrowserWindow} = require('electron')
-const path = require('path')
-const iconPath = path.join(__dirname, "webapp/assets/img/glowing-bear.png");
-const userPath = path.join(app.getPath('home'), ".config/glowing-bear");
-
-app.setPath('userData', userPath);
-
-function createWindow () {
- // Create the browser window.
- const mainWindow = new BrowserWindow({
- title: "Glowing Bear",
- icon: iconPath,
- webPreferences: {
- contextIsolation: true
- }
- })
-
- // and load the index.html of the app.
- mainWindow.loadFile('webapp/index.html')
-
- // hide menu bar because it's useless
- mainWindow.setMenuBarVisibility(false)
-
- // Open the DevTools.
- //mainWindow.webContents.openDevTools()
-}
-
-// This method will be called when Electron has finished
-// initialization and is ready to create browser windows.
-// Some APIs can only be used after this event occurs.
-app.whenReady().then(() => {
- createWindow()
-
- app.on('activate', function () {
- // On macOS it's common to re-create a window in the app when the
- // dock icon is clicked and there are no other windows open.
- if (BrowserWindow.getAllWindows().length === 0) createWindow()
- })
-})
-
-// Quit when all windows are closed, except on macOS. There, it's common
-// for applications and their menu bar to stay active until the user quits
-// explicitly with Cmd + Q.
-app.on('window-all-closed', function () {
- if (process.platform !== 'darwin') app.quit()
-})