parent
f4cc73b0a5
commit
8af535e313
@ -0,0 +1,3 @@ |
|||||||
|
[General] |
||||||
|
BrowserApplication=chromium.desktop |
||||||
|
TerminalService=kf5-org.kde.konsole.desktop |
@ -0,0 +1,30 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# RPM filetrigger for kde5 preview plugins. |
||||||
|
# |
||||||
|
# Copyright (C) 2021 Artem Proskurnev <tema@proskurnevs.ru> |
||||||
|
# |
||||||
|
# This program is free software; you can redistribute it and/or modify |
||||||
|
# it under the terms of the GNU General Public License as published by |
||||||
|
# the Free Software Foundation; either version 2 of the License, or |
||||||
|
# (at your option) any later version. |
||||||
|
|
||||||
|
mf='/usr/share/kf5/plasma/plasmoids/org.kde.desktopcontainment/contents/config/main.xml' |
||||||
|
if egrep -qs $mf; |
||||||
|
then |
||||||
|
if [ -f $mf ]; |
||||||
|
then |
||||||
|
cat $mf > /tmp/main.xml |
||||||
|
f="/tmp/main.xml" |
||||||
|
g="/tmp/group.xml" |
||||||
|
t="/tmp/tempmain.xml" |
||||||
|
gstart=$(cat $f | grep -n "<group" | egrep -o "^[0-9]+") |
||||||
|
gend=$(cat $f | grep -n "</group>" | egrep -o "^[0-9]+") |
||||||
|
awk "NR>=$gstart && NR<=$gend" $f > $g |
||||||
|
awk "NR<$gstart" $f > $t |
||||||
|
xmlstarlet edit -u "/group/entry[@name='previewPlugins']/default" -v "audiothumbnail,ffmpegthumbs,imagethumbnail,exrthumbnail,jpegthumbnail,windowsimagethumbnail,svgthumbnail,windowsexethumbnail,comicbookthumbnail,directorythumbnail,fontthumbnail,blenderthumbnail,rawthumbnail,ebookthumbnail" $g | awk "NR>1" >> $t |
||||||
|
awk "NR>$gend" $f >> $t |
||||||
|
sed -i "s/<default\/>/<default><\/default>/g" $t |
||||||
|
mv -f $t $mf |
||||||
|
fi |
||||||
|
fi |
Loading…
Reference in new issue