#!/bin/sh # # RPM filetrigger for kde5 big icons. # # Copyright (C) 2021 Artem Proskurnev # # 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 "" | 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