Scripting wallpaper changes, Part 2: KDE

Looking at the Windows wallpaper changer way down the archives, scripting a wallpaper change in KDE is quite simple in comparison:

dcop kdesktop KBackgroundIface setWallpaper /path/to/file 7

The integer after the file path is the tiling mode, and mapped one-to-one to the choices in the KDE wallpaper selection dialog, meaning that the following options are available:

  1. Centered
  2. Tiled
  3. Centered Tiled
  4. Centered Maxpect
  5. Maxpect Tiled
  6. Scaled
  7. Centered Autofit
  8. Scale & Crop

Leave a Reply