Git Product home page Git Product logo

wallpaperswitch's Introduction

Wallpaper Switcher for KDE Plasma 6

One of the changes to the Plasma workspace in Plasma 5 (based on KDE Frameworks 5) and continued in Plasma 6 (based on KDE Frameworks 6) is that the option of having separate Plasma widgets on each virtual desktop is no longer available. This is unfortunate, because one useful side effect of being able to do that was the ability to have different desktop backgrounds (wallpaper) on different virtual desktops, so proving a useful visual cue as to the desktop currently displayed.

The most relevant KDE bug is https://bugs.kde.org/show_bug.cgi?id=341143

The position of the Plasma developers, as stated in the evaluation of that bug, is that there have been major architectural changes within Plasma and at the moment the option is not available, with no simple way to bring it back. It has been acknowledged as an omission and is currently being worked on. Please be considerate to the developers and refrain from commenting on the bug unless you really do have a useful contribution to make to the discussion.

This system tray application attempts to being back the ability to have different wallpapers on different virtual desktops, pending the feature being reintroduced into Plasma. It allows a wallpaper image file to be configured for each virtual desktop, and will change the background when the virtual desktop changes. It does this by changing the wallpaper image settings, so there is some Plasma configuration needed in order to use it. See below for instructions on how to do that.

Building and installing

The application is built and installed in much the same way as any other KDE application. Assuming that you have Qt 6, KDE Frameworks 6 and the Plasma desktop installed, go to a suitable build location (e.g. your home directory) and do:

 git clone https://github.com/martenjj/wallpaperswitch.git
 cd wallpaperswitch
 git switch kf6
 mkdir build
 cd build
 cmake ..
 make
 sudo make install

Building requires CMake and also KDE Frameworks development headers and libraries. Depending on your distro, you may need to install additional packages for these. If you are running Kubuntu then see the README.kubuntu file for a list of packages required.

Running and configuration

After the files are installed above, start the switcher either from whichever desktop launcher you use (it will appear in the "Utilities" category), or by typing the command 'wallpaperswitch' in a terminal or KRunner (summoned by typing Alt-F2). The "desktop" icon will appear in the system tray. If you set the "Start automatically on desktop startup" option on in the settings, the switcher will start automatically when the Plasma desktop starts.

If this is the first time that the application has been run the the configuration dialogue will appear automatically. Otherwise, click the right mouse button over the system tray icon and select the "Configure..." option from the menu. Turn on the "Enable the desktop wallpaper switcher" check box if necessary.

Each currently configured virtual desktop will be listed there. To select the wallpaper image for a desktop, double click the entry or select it and click the "Set Wallpaper" button. From the file dialogue that appears, choose an image file. Repeat the same for each virtual desktop or, if you have more than one screen, each screen for each virtual desktop.

Click the "Plasma desktop settings" link at the bottom right, and follow the instructions there to set the required desktop settings. Then finally click "OK" to save the configuration.

The wallpaper image that you selected for the current virtual desktop should now appear, and change when the virtual desktop changes.

Switching can be enabled or disabled using the "Enable Switching" option on the system tray popup menu.

Problems?

If you are able to build and install the application, but it will not run or it is not able to change the desktop background, then try starting it from a terminal window within the Plasma desktop. Observe the debugging messages for anything about missing files or any other problems.

If this does not indicate the problem then please raise an issue in GitHub (http://github.com/martenjj/wallpaperswitch). Do not raise a bug against KDE Plasma.

Plasma 5

The original wallpaper switch for Plasma 5 (branch 'master' in this repository) no longer works because of changes to the Plasma desktop slideshow plugin (commit ea32a761 to plasma-workspace).

If you are using Plasma 5 and wish to have different wallpaper images per virtual desktop, then I suggest that you install the "Vallpaper" plugin and set it as the desktop background. Its configuration dialogue will then allow you to select an image file (or multiple images) for each virtual desktop. You can obtain this plugin via GitHub, or by using the "Get New Plugins" button in the desktop configuration dialogue. I have no connection with Vallpaper, apart from being able to report that it appears to work well and does exactly what it says. Unfortunately it does not yet appear to have been updated for Plasma 6.

Thanks for your interest!

If you use virtual desktops and want wallpaper switching then I hope that this utility will come in useful, and also that one day it will not be necessary...

Jonathan Marten, http://github.com/martenjj

wallpaperswitch's People

Contributors

martenjj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ofenrohr racer46

wallpaperswitch's Issues

dual monitor support

Hello Jonathan Marten,

Thank you a lot for this nice app. It really help me adapt to KDE 5.
Is it possible to implement support for multimonitor system. For example, for dual monitor get two slideshow for left and right monitor wallparers?

Log Spamming

Leaving the default The "Background colour" and "Change every" settings in Plasma desktop settings can lead to log spamming with messages similar to:

plasmashell[8880]: No metadata file in the package, expected it at: "/home/-user-/Pictures/"

The default interval for "change every" is 10 seconds, and the above message will appear (multiple times) in the logs every 10 seconds.. It will also appear multiple times every time you switch desktops, but that is far less than every ten seconds.

I set the "Change Every" to 24 hours just to keep the logs cleaner.

This appears to be a case of the usual KDE/Plasma message spew, and nothing to do with wallpaperswitcher.

Can't build and install

It won't install after following the instructions and installing all dependencies specified on README.kubuntu on Kubuntu 18.10 with KDE 5 (Lenovo Ideapad 320 i3 2.0Ghz / 8GBRAM)

screenshot_20190122_130618

You would think I was supposed to be able to read the message thrown by the error, but I can't. Sorry. Please help!
I would really appreciate it. Thanks

Memory leak

Thank you very much for this app. It makes KDE much more usable for me.

I am noticing a memory problem with Plasma 5 in Kubuntu 18.04 (plasma-desktop 4:5.12.4-0ubuntu1).
I have configured three virtual desktops with different image files. Every time I switch desktops, the "Shared Mem" usage in ksysguard or in "ps aux" increases by about 50 MB. It doesn't take long for plasmashell memory usage to reach over 2GB.

Here is an example of the memory usage change after one desktop switch.

~/$ ps aux --sort -rss | grep plasmashell
gamurray 15123  1.8  9.7 5340844 1568164 ?     Sl   09:28   0:28 /usr/bin/plasmashell

~/$ ps aux --sort -rss | grep plasmashell
gamurray 15123  1.9 10.0 5402288 1623596 ?     Sl   09:28   0:29 /usr/bin/plasmashell

I first noticed this when my Maven builds started running out of memory. The only workaround I have is to log out and log back in.

Cannot launch

Installed as User, and as Root - both have same issues

1 No menu entry

2 krunner does nothing when trying to launch wallpaperswitch

3 Attempts to launch from the desktop file give this error:

screenshot_20170928_153835

Feature request - allow for selecting a folder rather than an image per desktop

Hello Martenjj,

First, Thank you very much for providing this wallpaper switcher app for KDE plasma 5. It works very well. Like you and many others, I am hoping that the KDE developers will bring back the custom virtual desktop workspaces with custom wallpapers and widgets (icons) that Plasma 4 already had. I truly cannot understand why they did not make every effort to include that in Plasma 5.

Here is my request: It would be really nice if we could select a particular folder for images for a desktop workspace, rather than a specific image, where your application would automatically select whatever image file is in that folder. The reason for this is that I also really like the "Variety" wallpaper changer program, and for KDE users you have to specify a particular folder like "variety-wallpaper" and the image "wallpaper-kde.jpg", only the image file name changes when the wallpaper changes to something like "wallpaper-kde**-32365**.jpg". I think that your wallpaper switcher app and the Variety wallpaper changer app would work well together if this could be done. I already contacted the "Variety" developer to see if they could lock in the image name to just "wallpaper-kde.jpg" without adding the "-#####", but have not heard back from them yet.

Another reason is that I really enjoy having a "quotes" option on my desktop which in Plasma 5 does not exist anymore, no fortune widget or app is available that work, that I know of; but Variety's quotes works and they have some other very nice features as well.

Also, In your instructions for wallpaper switcher, you also mention that the KDE desktop slideshow option should be set to a certain time 12hrs, how necessary is that? It seems that having 10 seconds in that seconds field is necessary for Variety to work, but the hours and minutes can be changed to whatever. I was using 2 minutes 10 secs for Variety and 3 minutes 10 secs for KDE desktop slideshow options, and it seemed to work.

Thank you for your consideration.

Best regards to you and yours,
Phil
phd21

Double instantiation

Ok, this worked out of the box following the step by step Johnathan Marten's write up.
Thank you very much Mr Marten.
Only tiny problem was that it is possible to get two instances running in the tray if you aren't careful.

Two years of wailing in the wind, only to have the "impossible" accomplished by leveraging something already existing. Very Clever. And thanks again.

My environment:
Manjaro Linux (rolling release Stable).
Kernel 4.4.38-1-MANJARO #1 SMP PREEMPT
KDE Plasm 5.8.4
Kde Framework 5.28.0
QT Version 5.7.0 64bit

Logs being spammed

Jan 08 20:08:01 steve-pc plasmashell[25838]: No metadata file in the package, expected it at: "/home/steve/Desktop/WallPaper Switcher/"
Every two seconds or so.

Thank you for this nice option

Hi Jonathan Marten,

Thank you for this nice option.

I am using Linux Mint KDE 18.1 (Ubuntu 16.04 Plasma 5) and Linux Mint KDE 17.3 (Ubuntu 14.04 Plasma 4). In Linux Mint 18.x Plasma 5 I really miss having the different wallpapers and different widgets (icons) per virtual desktop without using "Activities". Now with your utility, I at least have the wallpapers back. :)

I did however have to install these before it would compile on my system.
extra-cmake-modules
libkf5crash-dev

Can you please make easy to install ".deb" files from this for 64-bit and 32-bit systems?

I tried "sudo dpkg-repack wallpaperswitch", but it did not work. Then, I tried "sudo checkinstall" from the "~/wallpaperswitch/build/src" and it did create a 64-bit deb file, but I do not yet have the experience to know if it is a good install file compared to compiling your code per your instructions.

Best regards to you and yours,
Phil
phd21

Is it possible to avoid opening the configuration window at every KDE startup?

Hello. Currently I'm autostarting wallpaperswitch by placing the following contents in a wallpaperswitch.desktop file under ~/.config/autostart:

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=/usr/local/bin/wallpaperswitch
GenericName[en_US]=
GenericName=
Icon=system-run
MimeType=
Name[en_US]=
Name=Wallpaper Switch
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

However, it opens up the configuration window every time I login to KDE. Is there a way to avoid this? The app doesn't seem to have any command-line switches or at least there is no -h/--help option that lists them…

In two-monitor setup, the wallpaperswitch works only on one of the monitors.

My PC runs Linux Mint 18.3 KDE "Sylvia" operating system, which has KDE Plasma 5. Upon folowing the instructions on https://github.com/martenjj/wallpaperswitch (including those in README.kubuntu file - important!) to the letter, the wallpaperswitch installed smoothly. Thank you very much indeed.

There is one particular issue here that might be of interest to the develper(s) of this highly useful project.

My system uses two monitors (the usual setup), call them "the left" (L) and "the right" (R) one. Thus, when one sets (say) 4 virtual Desktops, one gets a total of 8 "workspaces" - two visible at any one time - the left one and the right one - Lk and Rk (k = 1,2,3,4).

But the installation of "wallpaperswitch" appears possible either only for the "left" workspaces, or, only for the "right" workspaces.

Say, the wallpaperswitch is configured for the "left" workspaces. Switching through virtual desktops k = 1,2,3,4 one then gets four different pictures displayed on the left monitor - but the right monitor always displays the same background picture (configured in the ordinary way, without the wallpaperswitch)!
(The analogous happens when one configures wallpaperswitch for the "right" workspaces: then the right monitor cycles through four different pictures but the left monitor picture stays the same.)

Is there any way to modify the wallpaperswitch software so that, in the above example, one can have eight different background pictures, Lk, Rk (k=1,2,3,4)? (BTW: this too was a native property of KDE prior to "Plasma 5".)

Disabling virtual desktop switching with the mousewheel.

First of all thanks for this utility. It's great to have a different wallpaper on each desktop again.
I switched from Deepin Desktop, which has about the coolest Virtual Desktop Manager.

I tried disabling virtual desktop switching with the mousewheel in System Settings > Desktop Behavior > Virtual Desktops > Switching-tab. But there is nothing for it.

Is it possible in wallpaperswitch to disable switching with the mousewheel ?

Fade effect Annoyance.

Wallpaper slideshow in later versions of KDE/Plasma5 have a transition effect
set to fade, with a duration of 1 second and no messing with settings seems to change this.

This affects wallpaperswitcher.

However you can adjust the time for this in
/usr/share/plasma/wallpapers/org.kde.slideshow/contents/config/main.xml

<entry name="TransitionAnimationDuration" type="int">
  <label>Fade Transition Animation  (ms)</label>
  <default>0010</default>
</entry>

Change the default from 1000 to 10 or less.
You have to be root to change this.

That still won't change it until your unlock widgets,
Log out.
Log in.

Go to Settings / System settings / Desktop Behavior / Virtual Desktop / Switching Tab

Change the transition name and either set it back to fade or set to none. (this seems to be ignored).

Then get out of desktop settings.
Lock widgets again. It will probably be set and saved.
Maybe you have to log out and in again at this point. Its voodoo. IDK. Play with it.
Eventually you can get it to speed up that transition to what ever you want.

I suspect it gets copied somewhere into your user directory but I don't know where, or when.

This value will never be shown to you in any control applet and your changes never seem to be honored when using the standard controls so you have to hack it in this way.

List of packages required on fresh Kubuntu Xenial install to compile this

Hello. This is the list of packages required to be installed on a fresh Kubuntu Xenial install to compile this. I arrived at this by trial and error. Might be useful to mention somewhere in the readme or wiki. I don't seem to have access to the wiki. Thanks!

build-essential
cmake
extra-cmake-modules
kio-dev
libkf5configwidgets-dev
libkf5crash-dev
libkf5iconthemes-dev
libkf5notifications-dev
libkf5widgetsaddons-dev
libkf5xmlgui-dev
plasma-workspace-dev
qtbase5-dev
qtdeclarative5-dev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.