Skip to content

avysk/wallflower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wallflower

Wallflower is a plugin for LXQT panel allowing to download wallpapers from wallheaven.cc and set up them.

Requirements

The plugin (obviously) needs LXQT panel. The desktop should be managed by pcmanfm-qt. The requests for setting a wallpaper is sent over DBus so it is needed as well.

Compilation

For compilation you need cmake and a C++ compiler recognized by it, supporting C++20 standard. You also need something (in the simplest case make) cmake can generate a build system for.

Installation

During the installation, the plugin itself (libwallflower.so) goes into ~/.local/lib/lxqt-panel directory, and the corresponding desktop file (wallflower.desktop) into ~/.local/share/lxqt/lxqt-panel.

Installation of the plugin

At this moment, the only way to install the plugin is to compile it from the source. Clone the repository, go into the directory where the cloned repository resides and do the following:

mkdir build
cd build
cmake ..
make
make install

Usage

Used locations in the filesystem

Besides what is mentioned above, the downloaded wallpaper goes into ~/.local/share/lxqt-panel/wallflower. Notice that on fetching the new wallpaper the old one is deleted.

Instructions

LXQT will find the desktop file automatically, but, unfortunately, will look only in system directories for plugins, so it will not find libwallflower.so by default. You have two options:

  • (recommended) Set LXQTPANEL_PLUGIN_PATH environment variable to ~/.local/lib/lxqt-panel/ before running the panel. This, for example, can be done in LXQT Session Settings, in the Environment section.

  • If you want, you can copy libwallflower.so to the system directory where other LXQT panel plugins are.

After you add the plugin to the panel, clicking on the corresponding icon will show the menu with will contain two commands ("search" and "never show again").

Click on "search" to download and set a wallpaper. When the plugin operates, the plugin icon is changed to show it is in a busy state. If something goes wrong, the plugin icon will be changed to show that an error occurred and a tooltip will contain the corresponding error message.

Clicking on "never show again" will prevent the current wallpaper from being shown again. The plugin will search for a new wallpaper immediately. The setting is saved between the sessions. Currently, there is no way to edit the list of wallpapers that should not be shown again, short of completely removing it by manually editing the configuration file (~/.config/lxqt/lxqt-panel.conf, find "wallflower" section and remove ignoredWallpapers key).

Configuration

In a plugin configuration dialog, you can search a term to be used for searching wallpapers. The search term is saved between the sessions. The default search term is "nature". You can also set the "results cutoff" value. As soon as the plugin finds the number of wallpapers at least equal to the cutoff value, it stops searching. The default value is 100. The maximum value possible is 9999. Notice that the setting high value may result in a long delay in the search due to the rate limiting.

If the checkbox "Auto reload wallpaper" is checked, you can choose next to it the time interval (1, 5, 10, 15, 30 minutes, or 1, 2, 6, 12, 24 hours) after which the plugin will search for a new wallpaper. The default value is 1 minute.

Hackety-hack

The plugin is in a very raw state, and a lot of things are wrong:

  • support for wallheaven.cc only

  • no regular update of wallpaper is supported, you have to click on the menu item when you want a new wallpaper

  • rate limiting is supported during the search, but if the download request hits 429, bad luck

  • the menu is not changed when the plugin is in the busy or error state

  • qDebug() outputs a lot of information and I don’t know where it goes to; if the panel is run from the command line, it goes to the console

About

LXQT panel plugin for changing wallpapers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages