Compare commits

...
Author SHA1 Message Date
jahruz67 a4634f19d5 Improve Linux package app store integration 2026-07-14 21:21:27 -07:00
jahruz67andGitHub 6c9ac3804a Merge pull request #7 from jahruz67/codex/detect-custom-shortcut-in-app
Disable Linux in-app global hotkeys and switch to desktop custom-shortcut command
2026-07-14 17:04:47 -07:00
2 changed files with 74 additions and 1 deletions
+3 -1
View File
@@ -31,7 +31,9 @@ Install the RPM with the distribution package manager:
sudo dnf install ./wis-free-v3-<version>-1.x86_64.rpm
```
For openSUSE, use `sudo zypper install ./wis-free-v3-<version>.x86_64.rpm`.
Uninstall it from a terminal with `sudo dnf remove wis-free-v3`. The RPM also ships desktop and AppStream metadata so graphical software centers such as GNOME Software can show the package as an app and offer install/uninstall actions for the local RPM.
For openSUSE, use `sudo zypper install ./wis-free-v3-<version>.x86_64.rpm` and `sudo zypper remove wis-free-v3`.
After installing, launch **WIS Free V3** from the application launcher or run `wis-free-v3` in a terminal. A reboot is not required.
+71
View File
@@ -196,6 +196,7 @@ rm -rf "$WORK_DIR"
mkdir -p "$WORK_DIR/root/usr/bin"
mkdir -p "$WORK_DIR/root/usr/share/applications"
mkdir -p "$WORK_DIR/root/usr/share/pixmaps"
mkdir -p "$WORK_DIR/root/usr/share/metainfo"
mkdir -p "$WORK_DIR/root/usr/share/doc/$APP_NAME"
mkdir -p "$DIST_DIR"
@@ -221,6 +222,32 @@ Icon=$APP_NAME
StartupWMClass=$APP_NAME
Terminal=false
Categories=Utility;Audio;
Keywords=dictation;speech;voice;transcription;whisper;
EOF
cat > "$WORK_DIR/root/usr/share/metainfo/$APP_NAME.metainfo.xml" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>$APP_NAME.desktop</id>
<metadata_license>MIT</metadata_license>
<project_license>$LICENSE</project_license>
<name>$DISPLAY_NAME</name>
<summary>$COMMENT</summary>
<description>
<p>WIS Free V3 is a desktop voice dictation app built with Go and Wails.</p>
<p>It records audio from a global shortcut, transcribes it, optionally refines the text, and types the result into the focused application.</p>
</description>
<launchable type="desktop-id">$APP_NAME.desktop</launchable>
<provides>
<binary>$APP_NAME</binary>
</provides>
<categories>
<category>Utility</category>
<category>Audio</category>
</categories>
<content_rating type="oars-1.1" />
<url type="homepage">https://github.com/Daishir0/wisp-open</url>
</component>
EOF
if [ -f README.md ]; then
@@ -250,6 +277,30 @@ Description: $COMMENT
On Wayland, install ydotool for direct keyboard injection.
EOF
cat > "$DEB_ROOT/DEBIAN/postinst" <<'EOF'
#!/usr/bin/env sh
set -e
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database /usr/share/applications >/dev/null 2>&1 || true
fi
if command -v appstreamcli >/dev/null 2>&1; then
appstreamcli refresh-cache --force >/dev/null 2>&1 || true
fi
exit 0
EOF
cat > "$DEB_ROOT/DEBIAN/postrm" <<'EOF'
#!/usr/bin/env sh
set -e
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database /usr/share/applications >/dev/null 2>&1 || true
fi
if command -v appstreamcli >/dev/null 2>&1; then
appstreamcli refresh-cache --force >/dev/null 2>&1 || true
fi
exit 0
EOF
chmod 0755 "$DEB_ROOT/DEBIAN/postinst" "$DEB_ROOT/DEBIAN/postrm"
dpkg-deb --build "$DEB_ROOT" "$DIST_DIR/${APP_NAME}_${PKG_VERSION}-${PKG_RELEASE}_${ARCH_DEB}.deb"
fi
@@ -269,7 +320,10 @@ Summary: $COMMENT
License: $LICENSE
Requires: gtk3
Requires: alsa-lib
Requires: webkit2gtk4.1
Requires: libayatana-appindicator-gtk3
Recommends: ydotool
Provides: application() application($APP_NAME.desktop)
%description
WIS Free V3 is a desktop voice dictation app built with Go and Wails.
@@ -280,10 +334,27 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}
cp -a "$RPM_PAYLOAD"/. %{buildroot}/
%post
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database /usr/share/applications >/dev/null 2>&1 || :
fi
if command -v appstreamcli >/dev/null 2>&1; then
appstreamcli refresh-cache --force >/dev/null 2>&1 || :
fi
%postun
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database /usr/share/applications >/dev/null 2>&1 || :
fi
if command -v appstreamcli >/dev/null 2>&1; then
appstreamcli refresh-cache --force >/dev/null 2>&1 || :
fi
%files
%attr(0755,root,root) /usr/bin/$APP_NAME
/usr/share/applications/$APP_NAME.desktop
/usr/share/pixmaps/$APP_NAME.png
/usr/share/metainfo/$APP_NAME.metainfo.xml
/usr/share/doc/$APP_NAME/README.md
EOF