iconkeeper is a lightweight Bash script that helps you back up and restore your KDE Plasma desktop icon layout.
KDE sometimes forgets icon positions. iconkeeper provides a simple way to preserve and recover your layout with ease.
- Backup your KDE desktop icon layout (
plasma-org.kde.plasma.desktop-appletsrc) - Restore from a named backup or the most recent one
- Automatically restart Plasma Shell after restore
- Stores backups in
~/.config/iconkeeper/backups/
- Clone or download the
iconkeeperscript. - Make it executable:
chmod +x iconkeeper.sh
- Move it to a location in your
$PATH:cp iconkeeper.sh ~/.local/bin/iconkeeper
Make sure ~/.local/bin is in your PATH. Add this to your ~/.bashrc or ~/.zshrc if needed:
export PATH="$HOME/.local/bin:$PATH"iconkeeper backupCreate a new backup of the current KDE icon layout.
iconkeeper listList all saved backups.
iconkeeper restore <filename>Restore a specific backup by filename.
iconkeeper restore lastRestore the most recent backup.
To automatically restore your layout at login:
-
Create the autostart directory:
mkdir -p ~/.config/autostart -
Create a file at
~/.config/autostart/iconkeeper.desktopwith the following contents:[Desktop Entry] Type=Application Exec=bash -c 'while ! pgrep -x plasmashell >/dev/null; do sleep 1; done; ~/.local/bin/iconkeeper restore last' Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=IconKeeper Restore Comment=Restore KDE icon layout at startup
-
The backup/restore operates on this file:
~/.config/plasma-org.kde.plasma.desktop-appletsrc -
After a restore,
iconkeeperautomatically restarts the Plasma Shell. -
Use at your own risk. For critical setups, manually back up your config before testing.
MIT License