krha/install.sh

23 lines
556 B
Bash
Raw Normal View History

2025-01-14 20:27:03 -07:00
#!/usr/bin/env bash
2025-01-14 18:26:40 -07:00
# Exit if something fails
2025-01-14 20:27:03 -07:00
set -ex
2025-01-14 18:26:40 -07:00
if [[ -z "$XDG_DATA_HOME" ]]; then
prefix=~/.local/share
else
prefix="$XDG_DATA_HOME"
fi
mkdir -p $prefix/krunner/dbusplugins/
mkdir -p $prefix/dbus-1/services/
2025-01-14 20:27:03 -07:00
PY=$(which python3)
2025-01-14 18:26:40 -07:00
cp plasma-runner-krha.desktop $prefix/krunner/dbusplugins/
sed "s|/home/qbit/projects/krha/krha.py|${PWD}/krha.py|" "org.kde.krha.service" > $prefix/dbus-1/services/org.kde.krha.service
2025-01-14 20:27:03 -07:00
sed "s|/usr/bin/python3|${PY}|" "org.kde.krha.service" > $prefix/dbus-1/services/org.kde.krha.service
2025-01-14 18:26:40 -07:00
2025-01-14 20:27:03 -07:00
kquitapp6 krunner
2025-01-14 18:26:40 -07:00