From 1976d75e4a07cc779e9807b523801e3b0c15ea41 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Wed, 28 Feb 2024 14:48:53 -0800 Subject: [PATCH] feat: Add KDE integration for Ptyxis feat: Customize default dock/favorite applications chore: Hide Konsole by default --- Containerfile | 5 +++++ usr/bin/kde-ptyxis | 11 +++++++++++ usr/etc/dconf/db/local.d/01-ptyxis | 9 +++++++++ usr/etc/xdg/kdeglobals | 3 +++ 4 files changed, 28 insertions(+) create mode 100755 usr/bin/kde-ptyxis create mode 100644 usr/etc/dconf/db/local.d/01-ptyxis create mode 100644 usr/etc/xdg/kdeglobals diff --git a/Containerfile b/Containerfile index 6e4406cf5ab..68a1193ee61 100644 --- a/Containerfile +++ b/Containerfile @@ -116,6 +116,11 @@ RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"$ sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/user.conf && \ sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \ sed -i '/^PRETTY_NAME/s/Kinoite/aurora/' /usr/lib/os-release && \ + sed -i '//,/<\/entry>/ s/[^<]*<\/default>/preferred:\/\/browser,applications:org.gnome.Ptyxis.desktop,applications:org.kde.discover.desktop,preferred:\/\/filemanager<\/default>/' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml && \ + sed -i '//,/<\/entry>/ s/[^<]*<\/default>/preferred:\/\/browser,systemsettings.desktop,org.kde.dolphin.desktop,org.kde.kate.desktop,org.gnome.Ptyxis.desktop,org.kde.discover.desktop<\/default>/' /usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/config/main.xml && \ + sed -i 's@Exec=ptyxis@Exec=kde-ptyxis@g' /usr/share/applications/org.gnome.Ptyxis.desktop && \ + cp /usr/share/applications/org.gnome.Ptyxis.desktop /usr/share/kglobalaccel/org.gnome.Ptyxis.desktop && \ + rm -f /usr/share/kglobalaccel/org.kde.konsole.desktop && \ rm -rf /tmp/* /var/* && \ ostree container commit && \ mkdir -p /var/tmp && \ diff --git a/usr/bin/kde-ptyxis b/usr/bin/kde-ptyxis new file mode 100755 index 00000000000..76408ed2cb4 --- /dev/null +++ b/usr/bin/kde-ptyxis @@ -0,0 +1,11 @@ +#!/usr/bin/bash +# Shim to handle KDE only supporting -e +# https://bugs.kde.org/show_bug.cgi?id=459616 +args=("${@//-e/--}") + +# Dolphin integration requires --new-window to function properly +if [[ ! "${args[@]}" =~ "--" && ! "${args[@]}" =~ "-h" && ! "${args[@]}" =~ "-x" ]]; then + /usr/bin/ptyxis --new-window "${args[@]}" +else + /usr/bin/ptyxis "${args[@]}" +fi diff --git a/usr/etc/dconf/db/local.d/01-ptyxis b/usr/etc/dconf/db/local.d/01-ptyxis new file mode 100644 index 00000000000..6c0e3a3149b --- /dev/null +++ b/usr/etc/dconf/db/local.d/01-ptyxis @@ -0,0 +1,9 @@ +[org/gnome/Ptyxis] +restore-session=false +restore-window-size=false +profile-uuids=['2871e8027773ae74d6c87a5f659bbc74'] +default-profile-uuid='2871e8027773ae74d6c87a5f659bbc74' + +[org/gnome/Ptyxis/Profiles/2871e8027773ae74d6c87a5f659bbc74] +palette='Breeze' +opacity=0.9 diff --git a/usr/etc/xdg/kdeglobals b/usr/etc/xdg/kdeglobals new file mode 100644 index 00000000000..dec0f8bacd1 --- /dev/null +++ b/usr/etc/xdg/kdeglobals @@ -0,0 +1,3 @@ +[General] +TerminalApplication=kde-ptyxis +TerminalService=org.gnome.Ptyxis.desktop