Change default favourite applications

People think that children may break system too easily via
systemsettings5 from favourites.
master
Mikhail Novosyolov 3 years ago
parent ad5cf3bde7
commit 9eb5dda88d
  1. 8
      kometa-std-desktop.spec
  2. 5
      kometa-std-desktop/PlasmaFavorites.filetrigger

@ -1,5 +1,5 @@
Name: kometa-std-desktop
Version: 1.8
Version: 1.9
Release: kometa1
Summary: Kometa default desktop settings
@ -10,6 +10,7 @@ Group: System/Configuration/Other
Url: http://oskometa.ru
BuildArch: noarch
Requires: xmlstarlet
Requires: /usr/bin/xml_grep
Source: %name-%version.tar
%description
@ -52,6 +53,7 @@ install -pm644 Таблица.ots %buildroot%skeldesktopdir
install -pm644 Презентация.otp %buildroot%skeldesktopdir
install -pm755 brandicons.filetrigger %buildroot%ftdir
install -pm755 previewplugins.filetrigger %buildroot%ftdir
install -pm755 PlasmaFavorites.filetrigger %buildroot%ftdir
install -pm644 kometa.list %buildroot%aptdir
%files
@ -66,9 +68,13 @@ install -pm644 kometa.list %buildroot%aptdir
"/etc/skel/Рабочий стол/Таблица.ots"
"/usr/lib/rpm/brandicons.filetrigger"
"/usr/lib/rpm/previewplugins.filetrigger"
"/usr/lib/rpm/PlasmaFavorites.filetrigger"
"/etc/apt/sources.list.d/kometa.list"
%changelog
* Mon Mar 14 2022 Mikhail Novosyolov <mikhailnov@altlinux.org> 1.9-kometa1
- Added filetrigger to change default favourite application in classical KDE menu
* Fri Mar 11 2022 Artem Proskurnev <tema@proskurnevs.ru> 1.8-kometa1
- OpenBoard settings

@ -0,0 +1,5 @@
#!/bin/sh
f=/usr/share/kf5/plasma/plasmoids/org.kde.plasma.kicker/contents/config/main.xml
if ! grep -q "$f"; then exit 0; fi
orig_line="$(xml_grep --cond "[@name='favoriteApps']" "$f" | grep -oPm1 "(?<=<default>)[^<]+")"
sed -i'.rpmsave' -e "s@${orig_line}@org.kde.dolphin.desktop,chromium.desktop@g" "$f"
Loading…
Cancel
Save