From a67afa9b4b727ba9a705cb094ef5572a694b1ce0 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 7 May 2025 22:52:12 +0300 Subject: [PATCH] bash/usr-local-bin: cp kile kate && s/kile/kate/g The goal here is not giving my intrusive thoughts power to make me declare "sudo rpm-ostree install kate" as essential while the flatpak exists and I most likely wouldn't even try using kate on files the flatpak won't have access to --- bash/usr-local-bin/kate | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bash/usr-local-bin/kate diff --git a/bash/usr-local-bin/kate b/bash/usr-local-bin/kate new file mode 100755 index 0000000..1866bbc --- /dev/null +++ b/bash/usr-local-bin/kate @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -x +# The usual system-wide installation +if [ -f /usr/bin/kate ]; then + /usr/bin/kate "$@" +# System-wide flatpak +elif [ -f /var/lib/flatpak/exports/bin/org.kde.kate ]; then + flatpak run org.kde.kate "$@" +# User-specific flatpak +elif [ -f ~/.local/share/flatpak/exports/bin/org.kde.kate ]; then + flatpak run --user org.kde.kate "$@" +# If not found. +else + printf "kate doesn't seem to be installed :(" +fi +set +x