Update to 0.5.0

This commit is contained in:
Stewart Wong 2025-12-20 16:36:55 +00:00
parent ed89343491
commit 522f28e24f
3 changed files with 25 additions and 2 deletions

View file

@ -1,6 +1,6 @@
pkgbase = hamr
pkgdesc = Extensible launcher for Hyprland built with Quickshell
pkgver = 0.4.1
pkgver = 0.5.0
pkgrel = 1
url = https://github.com/Stewart86/hamr
arch = any

View file

@ -1,6 +1,6 @@
# Maintainer: Stewart Wong <siwei.wong@gmail.com>
pkgname=hamr
pkgver=0.4.1
pkgver=0.5.0
pkgrel=1
pkgdesc='Extensible launcher for Hyprland built with Quickshell'
arch=('any')

View file

@ -32,6 +32,29 @@ post_install() {
post_upgrade() {
local config_file="$HOME/.config/hamr/hamr.json"
# Migrate: remove old prefix config if it matches system defaults
if [ -f "$config_file" ]; then
local default_prefix='{"action":"/","app":">","clipboard":";","emojis":":","file":"~","math":"=","shellCommand":"$","shellHistory":"!","webSearch":"?"}'
local current_prefix
current_prefix=$(jq -c '.search.prefix // empty' "$config_file" 2>/dev/null)
if [ -n "$current_prefix" ]; then
# Normalize both for comparison (sort keys)
local current_sorted
local default_sorted
current_sorted=$(echo "$current_prefix" | jq -cS '.' 2>/dev/null)
default_sorted=$(echo "$default_prefix" | jq -cS '.' 2>/dev/null)
if [ "$current_sorted" = "$default_sorted" ]; then
# Remove the old prefix config since it's the default
jq 'del(.search.prefix)' "$config_file" > "$config_file.tmp" && mv "$config_file.tmp" "$config_file"
echo "==> Migrated: removed default prefix config (now using actionBarHints)"
fi
fi
fi
echo ""
echo "==> Hamr has been upgraded."
echo "==> Restart quickshell to apply changes."