This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Panel icons rearange when switching activities or reboot

Tags: None
(comma "," separated)
drruss
Registered Member
Posts
1
Karma
0
(Fedora 36 KDE Plasma)

I'm having an issue with the icons rearranging themselves every time I reboot or simply switch between activities.
I have made this short video to illustrate this, note the Firefox and Chrome icons.

https://imgur.com/a/0rM3Xj9

Any help would be greatly appreciated!
User avatar
Section_8
Registered Member
Posts
61
Karma
0
OS
Since no one else has replied to this, I'll take a shot

I've never had this problem with my panel icons, but I have had my desktop icons rearranged at random, IIRC after some game that runs at at a lower resolution than my desktop ends.

After some googling, I found that the KDE desktop icon layout is saved in the file $HOME/.config/plasma-org.kde.plasma.desktop-appletsrc. If you browse in that file a little, it looks like it controls a lot more than the desktop icon layout. If it also controls the layout of the panels, the fix below may help with your problem.

I hacked up the little bash script below to save and restore my deskop layout - I have it saved in $HOME/bin/desktop. When I run "desktop -b", it makes a backup copy of $HOME/.config/plasma-org.kde.plasma.desktop-appletsrc. "desktop -r" stops plasma, restores the backed up copy of $HOME/.config/plasma-org.kde.plasma.desktop-appletsrc, and then restarts plasma - restoring my desktop layout.

I run "desktop -b" in my KDE autostart script, so my desktop layout is saved when I start KDE. On the (now very rare) occasion when my desktop icon layout gets screwed up, I run "desktop -r" to restore it.

Code: Select all
#!/bin/bash
#  backup/restore the KDE desktop icon positions:
#  Usage:
#       desktop -b (default)  backup
#       desktop -r            restore

iconfile="$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc"
backup="${iconfile}_bkup"
saved="${iconfile}_old"

dobackup=1

# process command parms:
while  (( $# > 0 )); do
    case  "$1" in
        -b )
            dobackup=1
            ;;
        -r )
            dobackup=0
            ;;
    esac
    shift
done

if  (( dobackup )); then
    cp -f "$iconfile" "$backup"
else
    rm -f "$saved"
    mv "$iconfile" "$saved"
    kquitapp5 plasmashell
    sleep 2
    cp -f "$backup" "$iconfile"
    kstart5 plasmashell&
    echo "Restored $backup to $iconfile"
    # kquitapp5 plasmashell && kstart5 plasmashell
fi


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]