mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-29 18:32:48 +00:00
chore(kde): Switch to using a shim to handle quirks w/ Prompt on KDE
This commit is contained in:
parent
04b769f87c
commit
0998bda759
@ -328,10 +328,10 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
|
||||
rm -rf /tmp/kwin-system76-scheduler-integration && \
|
||||
rm -rf /tmp/wallpaper-engine-kde-plugin && \
|
||||
sed -i '/<entry name="launchers" type="StringList">/,/<\/entry>/ s/<default>[^<]*<\/default>/<default>preferred:\/\/browser,applications:steam.desktop,applications:net.lutris.Lutris.desktop,applications:org.gnome.Prompt.desktop,applications:org.kde.discover.desktop,preferred:\/\/filemanager<\/default>/' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml && \
|
||||
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.kde.konsole.desktop && \
|
||||
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nX-KDE-AuthorizeAction=shell_access\nX-KDE-Shortcuts=Ctrl+Alt+T@g' /usr/share/applications/org.gnome.Prompt.desktop && \
|
||||
sed -i 's/^Exec=prompt$/Exec=prompt --new-window/' /usr/share/applications/org.gnome.Prompt.desktop && \
|
||||
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nX-KDE-Shortcuts=Ctrl+Alt+T@g' /usr/share/applications/org.gnome.Prompt.desktop && \
|
||||
sed -i 's@Exec=prompt@Exec=kde-prompt@g' /usr/share/applications/org.gnome.Prompt.desktop && \
|
||||
cp /usr/share/applications/org.gnome.Prompt.desktop /usr/share/kglobalaccel/org.gnome.Prompt.desktop && \
|
||||
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.kde.konsole.desktop && \
|
||||
rm -f /usr/share/kglobalaccel/org.kde.konsole.desktop \
|
||||
; else \
|
||||
rpm-ostree override replace \
|
||||
|
12
system_files/desktop/kinoite/usr/bin/kde-prompt
Executable file
12
system_files/desktop/kinoite/usr/bin/kde-prompt
Executable file
@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
unshift() { local -n ary=$1; shift; ary=("$@" "${ary[@]}"); }
|
||||
if [[ ! "${args[@]}" =~ "--" && ! "${args[@]}" =~ "-h" && ! "${args[@]}" =~ "-x" ]]; then
|
||||
unshift args "--new-window"
|
||||
fi
|
||||
|
||||
/usr/bin/prompt "${args[@]}"
|
Loading…
x
Reference in New Issue
Block a user