KDE Plasma screensaver

If any of you are using any of the KDE Plasma versions of Garuda like I am, you know KDE no longer has a built in screensaver function. Rather than installing xscreensaver or some other package I thought I would share what I did instead to either show a slide show of pictures in a designated directory, or to shuffle play a directory full of videos as my screensaver.

No, this isn't technically really a screensaver, but it worked for me, maybe someone else would like it. You still have to close the app when you want to "wake up" the machine, because all this really does is open up a different app, but I'm sure this could be improved too.

#!/bin/bash


#####################Directions######################
# KDE didn't have a screensaver, so created this to either display pics or play videos  
# Dale/Zepherusbane
#
# NOTE:  Call this script from KDE's energy saving configuration, set to use a script after X minutes.
# This is located under "Power Managment->Energy Saving" in KDE settings, note 
# this was for KDE Plasma 5.21.4
# it's probably still there even in other versions, just look for energy settings
# Check the checkbox to "run script", add a link to this script (I put this in my home dir in a scripts dir)
# don't forget to chmod your script to be executable.
# you probably want to either uncheck or adjust your dim screen or screen energy savings options or your
# screen will still black out based on those, I still used these, just increased the time.
#####################################################

# Start a slideshow of my curated pics for a screensaver
#-s for slideshow, -f for fullscreen
# uncomment gwenview line, comment the mpv line
#gwenview -s -f /run/media/dale/DATA/mypics/screen-saver-pics/

# Use this line to play all the movies in a directory, shuffle style.
# this directory has a bunch of the cached files from the Apple TV screensaver that I like.
# --shuffle to randomly play the videos, -fs to open in full screen mode
# uncomment mpv line, comment the gwenview line
mpv --shuffle /run/media/dale/DATA/mydocs/DownloadedScreensavers/Aerial/cache/ -fs

Here's a pic of where you set this up in Plasma's settings. As you can see I still left the dim screen and screen energy settings active, I just increased the default times for them.

I like the default screensaver movies from Apple TV, so I got a bunch of those into a directory. You can pull these direct from Apple, or there's a guy that put them all up on a site here: https://aerial-screensavers.netlify.app/

5 Likes

Cool script and idea!
Did you consider setting auto screen lock? Plasma lets you set the wallpaper for the lock screen when you click the configure appearance button in Screen Locking settings. Instead of 'Image', you can select 'Slideshow' then it lets you select the folder for your images. You can set time interval and shuffle from there too. No need to install anything... unless you want to use videos, then you can get Video LockScreen wallpaper plugin which adds a video option to the dropdown menu where you select Image or Slideshow. I tried it for fun with a .mov from the site you linked and it worked nicely :slight_smile:

3 Likes

Great idea, thanks.

I might try that method instead, turns out the "run script" function doesn't pay attention to activity the way the dim screen and screen energy saving does - meaning as long as you are doing something you don't have any issues, but if you are watching a movie or something like that the script still get executed. I expected the run script to work the same as the other energy saving items.

2 Likes

Do you ming is I use this in multimedia. I will give credit.

1 Like

You can use whatever you wish, I just didn't think this was a good solution in the end due to the issue I mentioned in my previous post. If you deal with that it should be fine though.

1 Like