summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKimiblock Moe2025-01-16 23:29:38 +0800
committerKimiblock Moe2025-01-16 23:29:38 +0800
commite150308b7f4ba25028f27d335d062fcc3fa07d52 (patch)
tree4f898e6814acb85dc1523fa19fe47b2ffc1732e4
parent04b9d5dd5cf1580d6e4aa41bca92b55c33703d42 (diff)
downloadaur-e150308b7f4ba25028f27d335d062fcc3fa07d52.tar.gz
Support various portable actions
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--obsidian.desktop21
-rw-r--r--obsidian.sh11
4 files changed, 36 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19ef390d1d8b..4547eda4580b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = obsidian-bwrap
pkgdesc = A powerful knowledge base that works on top of a local folder of plain text Markdown files. Sandboxed by portable for privacy.
pkgver = 1.7.7
- pkgrel = 1
+ pkgrel = 2
url = https://obsidian.md
arch = x86_64
license = custom:Commercial
@@ -16,9 +16,9 @@ pkgbase = obsidian-bwrap
source = portable-config
source = obsidian.desktop
source = https://github.com/obsidianmd/obsidian-releases/releases/download/v1.7.7/obsidian-1.7.7.tar.gz
- sha256sums = ea46078cb9535767040979337957693512e97fcc8810cb6bd56a720bff3377ae
+ sha256sums = 369188cbb9d9d2826757d48e013f711d8c9a243245bbd11cb1ef75c95572690d
sha256sums = f323046d9024b5bcba858cdddc481b3aac4d93ccf0da3ca11a53d7a18a40c256
- sha256sums = 05882d42311d182d69e645caafbbdc0f09f103536390c9090c66f14b31f176cc
+ sha256sums = 96a25eefe6c2b854dd85f057f05d23fedba3e6a1380b15327dabac24dcc35ed0
sha256sums = e881ea06f671db2c5002f0038b73a4e4b7b78a9dbf73aa9a7d0dc54a93d3d29a
pkgname = obsidian-bwrap
diff --git a/PKGBUILD b/PKGBUILD
index b22aae6923ad..e50ca5407c55 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=obsidian-bwrap
pkgver=1.7.7
-pkgrel=1
+pkgrel=2
pkgdesc="A powerful knowledge base that works on top of a local folder of plain text Markdown files. Sandboxed by portable for privacy."
arch=('x86_64')
url="https://obsidian.md"
@@ -17,9 +17,9 @@ source=("obsidian.sh"
"obsidian.desktop"
"https://github.com/obsidianmd/obsidian-releases/releases/download/v${pkgver}/obsidian-${pkgver}.tar.gz"
)
-sha256sums=('ea46078cb9535767040979337957693512e97fcc8810cb6bd56a720bff3377ae'
+sha256sums=('369188cbb9d9d2826757d48e013f711d8c9a243245bbd11cb1ef75c95572690d'
'f323046d9024b5bcba858cdddc481b3aac4d93ccf0da3ca11a53d7a18a40c256'
- '05882d42311d182d69e645caafbbdc0f09f103536390c9090c66f14b31f176cc'
+ '96a25eefe6c2b854dd85f057f05d23fedba3e6a1380b15327dabac24dcc35ed0'
'e881ea06f671db2c5002f0038b73a4e4b7b78a9dbf73aa9a7d0dc54a93d3d29a')
package() {
diff --git a/obsidian.desktop b/obsidian.desktop
index e43d9253e55d..cdc61671e4e9 100644
--- a/obsidian.desktop
+++ b/obsidian.desktop
@@ -10,4 +10,23 @@ MimeType=x-scheme-handler/obsidian;
Categories=Office;
X-Flatpak-Tags=proprietary;
X-Flatpak=md.obsidian.Obsidian
-X-Flatpak-RenamedFrom=obsidian.desktop; \ No newline at end of file
+X-Flatpak-RenamedFrom=obsidian.desktop;
+Actions=opendir;share;quit;
+
+[Desktop Action opendir]
+Name=Open Obsidian Home
+Name[zh_CN]=打开数据目录
+Exec=/usr/bin/wechat.sh --actions opendir
+Icon=go-home-symbolic
+
+[Desktop Action share]
+Name=Share files with Obsidian
+Name[zh_CN]=向 Obsidian 传输文件
+Exec=/usr/bin/wechat.sh --actions share-files
+Icon=insert-image-symbolic
+
+[Desktop Action quit]
+Name=Quit Obsidian
+Name[zh_CN]=退出 Obsidian
+Exec=/usr/bin/wechat.sh --actions quit
+Icon=system-log-out-symbolic \ No newline at end of file
diff --git a/obsidian.sh b/obsidian.sh
index 23185350b554..4d2b81454c98 100644
--- a/obsidian.sh
+++ b/obsidian.sh
@@ -1,5 +1,14 @@
#!/bin/bash
export _portableConfig=md.obsidian.app
+export launchTarget="electron34 /usr/lib/obsidian/app.asar --ozone-platform-hint=auto --enable-wayland-ime --wayland-text-input-version=3 $@"
-launchTarget="electron34 /usr/lib/obsidian/app.asar --ozone-platform-hint=auto --enable-wayland-ime --wayland-text-input-version=3 $@" portable --actions connect-tty
+if [[ "$@" = "--actions opendir" ]]; then
+ portable --actions opendir
+elif [[ "$@" = "--actions share-files" ]]; then
+ portable --actions share-files
+elif [[ "$@" = "--actions quit" ]]; then
+ portable --actions quit
+else
+ portable
+fi \ No newline at end of file