You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
931 B
31 lines
931 B
3 years ago
|
#!/bin/sh
|
||
|
#
|
||
|
# RPM filetrigger for kde5 big icons.
|
||
|
#
|
||
|
# 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.plasma.taskmanager/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='iconSize']/default" -v "5" $g | awk "NR>1" >> $t
|
||
|
awk "NR>$gend" $f >> $t
|
||
|
mv -f $t $mf
|
||
|
rm -f $f $g $t
|
||
|
fi
|
||
|
fi
|