#!/bin/bash
#
LOOKANDFEELPKG=`kreadconfig5 --file kdeglobals --group KDE --key LookAndFeelPackage`

kdialog --title "Resolution Changed" --yesno \
"<div style="text-align:center">Your display resolution has changed.<br><br>The Look-And-Feel theme you are using is<br><br><b>${LOOKANDFEELPKG}</b><br><br>Would you like to reset your desktop layout, scaled to the new resolution?<br></div>";

if [ "$?" = 0 ]; then
    qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.loadLookAndFeelDefaultLayout $LOOKANDFEELPKG
fi;
