varietywalls / variety Goto Github PK
View Code? Open in Web Editor NEWWallpaper downloader and manager for Linux systems
Home Page: http://peterlevi.com/variety
License: GNU General Public License v3.0
Wallpaper downloader and manager for Linux systems
Home Page: http://peterlevi.com/variety
License: GNU General Public License v3.0
The packaging I maintain has diverged a lot: it has cleaned up dependencies, made others optional, added missing things, etc.
It would be nice if we could have some sort of categorization of images. For instance, nature, black and white pictures, wildlife, space etc. While I know that categorization is a complex and pretty much an arbitrary concept it would be nice if we could have some sort of categorization so that people could either look for more pictures from certain concepts of have pictures of a particular concept in different settings.
Just as an e.g. if I were to a GNU/Linux presentation for a wildlife group it would make sense to have wildlife pictures in the wallpaper all the time, if doing a presentation for space enthusiasts, I could select space (universe, galaxy etc.) and do the same. Right now there isn't any way to do the above except have an image and make it current.
Thoughts ?
I apologize in advance - I'm not super familiar with computers/GitHub. I've been using the program Variety for a while, but I noticed it stopped working recently. I had some troubles installing python packages on python3 and python2.7, so I think whatever I did to fix that issue messed up Variety somehow. I couldn't find any solutions online and thought I'd ask here. I'm using Ubuntu 16.04.
It no longer runs like this:
variety
Traceback (most recent call last):
File "/usr/bin/variety", line 38, in
import variety
File "/usr/lib/python2.7/dist-packages/variety/init.py", line 111, in
from variety import VarietyWindow
File "/usr/lib/python2.7/dist-packages/variety/VarietyWindow.py", line 22, in
from variety.FacebookHelper import FacebookHelper
File "/usr/lib/python2.7/dist-packages/variety/FacebookHelper.py", line 55, in
from variety.Util import Util
File "/usr/lib/python2.7/dist-packages/variety/Util.py", line 16, in
import bs4
File "/usr/lib/python2.7/dist-packages/bs4/init.py", line 30, in
from .builder import builder_registry, ParserRejectedMarkup
File "/usr/lib/python2.7/dist-packages/bs4/builder/init.py", line 314, in
from . import _html5lib
File "/usr/lib/python2.7/dist-packages/bs4/builder/_html5lib.py", line 70, in
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
If anyone could help, I would really appreciate it. Thank you!
Extract the logic for non-configurable downloaders (e.g. Desktoppr, Bing, etc.) to plugins so that we could add new ones with less effort by adding a single plugin file rather than touching multiple places.
Delete to Trash isn't deleting the item (perhaps any name changes from Trash to Rubbish bin in Ubuntu 16.04)
Can you make this work on Windows
I'm experiencing that the images I opt to delete from Variety's interface does not get moved to trash, and if I start the Wallpaper Selector after deleting the images are still there.
I have tried restarting Variety with no luck. I will proceed to remove the Variety configuration completely, to see if this solves the issue.
Can you add the option of "add your own URL" in the general images location. Users can then select own URL location of images to use as background.
Thanks
Right now get_wallpaper only supports a subset of DEs, and falls back to searching for a GNOME wallpaper even when this isn't correct (#175). We should aim for feature parity between these scripts.
Currently only supported in set_wallpaper:
Here is the relevant code in the LocalFilesSource plugin, the multiline regex clears the newlines:
def load(self, path):
try:
logger.info(lambda: "Loading quotes file %s" % path)
with open(path, 'rU') as f:
s = f.read().decode('utf-8', errors='ignore')
for q in re.split(r'(^\.$|^%$)', s, flags=re.MULTILINE):
try:
if q.strip() and len(q.strip()) > 5:
parts = q.split('-- ')
quote = ' '.join(parts[0].split())
if quote[0] == quote[-1] == '"':
quote = u"\u201C%s\u201D" % quote[1:-1]
author = parts[1].strip() if len(parts) > 1 else None
self.quotes.append({"quote": quote, "author": author, "sourceName": os.path.basename(path)})
except Exception:
logger.debug(lambda: 'Could not process local quote %s' % q)
except Exception:
logger.exception(lambda: "Could not load quotes file %s" % path)
Put in ~/.config/variety/pluginconfig/quotes/ to test:
quotes2.txt
Originally asked here: https://answers.launchpad.net/variety/+question/671469
Hi there,
firstly: thx - i just found this program - nice work.
Second a suggestion:
As i looked up the world sunlight map webpage with its Full Disk (Earth that is) Dusk and Dawn images i thought if this isn't somehow available with real images. And it is.
I found some stationary weather satellites that show live images on the net - updated ever 15-20 min
First a satellite from Japan - Himawari 8 - showing pictures centered around Japan - so Australia, some parts of asia.
You can see the live images here: http://himawari8.nict.go.jp/
As i couldn't find a way on this page to get the url of an image "ready" to be used - and read it is parted in 16 split images i looked for an alternative for a full disk image of this satellit.
I found it here: http://rammb.cira.colostate.edu/ramsdis/online/himawari-8.asp
(Natural Color -> latest image or archive).
Also i found another sattelite Geos 16 with a view of South and Nort America.
https://www.star.nesdis.noaa.gov/GOES/GOES16_FullDisk_Band.php?band=GEOCOLOR&length=24
If you stop that animation you can see the image url leading to full disk images:
https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/
There is another one - DSCOVR- with lesser quality pictures available located between earth and sun
https://epic.gsfc.nasa.gov/
It gives a picture of earth rotation throughout the day.
As i am for europe those two aren't my favorites and so i searched (so far not 100% as nice as the two above due to altered images (countrys in dark areas marked etc.).
I found Meteosat satellites:
https://www.eumetsat.int/website/home/Images/index.html
But from there so far nothing comparable to the other two and not "untouched" live.
I found a general weather satellite image link page - https://dbaron.org/sat/
But there most of the links are outdated/not working. Maybe someone else can add some more.
Also a discussion with some links about the same topic:
https://www.metabunk.org/full-disk-hd-images-of-the-earth-from-satellites.t8676/
Would be great if a "module" for those could be added. That's my suggestion.
I am running variety 0.6.7.1
$ apt-cache policy variety
variety:
Installed: 0.6.7-1
Candidate: 0.6.7-1
Version table:
*** 0.6.7-1 900
900 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages
100 http://cdn-fastly.deb.debian.org/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
Now when I look into .config/variety/ I see the following directories -
~/.config/variety$ ls
Downloaded Fetched pencil_tile.png scripts variety.conf variety.log
Favorites history.txt plugins ui.conf variety_latest_default.conf wallpaper
Now if after sometime I try to use mediainfo to get info. on a random image, it gives a pretty limited info. something like -
~/.config/variety/Favorites$ mediainfo ZQs3vcsHiGY.jpg
General
Complete name : ZQs3vcsHiGY.jpg
Format : JPEG
File size : 895 KiB
Image
Format : JPEG
Width : 2 500 pixels
Height : 1 576 pixels
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Compression mode : Lossy
Stream size : 895 KiB (100%)
ColorSpace_ICC : RGB
It would be nice if the images had more fields and metadata for e.g. who was the author was of the image, from where it was taken or whatever info. can be garnered.
An example of the info. I'm looking for -
$ mediainfo BigBuckBunny.ogv
General
Complete name : BigBuckBunny.ogv
Format : Ogg
File size : 46.5 MiB
Duration : 9 min 56 s
Overall bit rate mode : Variable
Overall bit rate : 653 kb/s
Movie name : Big Buck Bunny
Writing application : Lavc52.35.0
Terms of use : http://creativecommons.org/licenses/by/3.0/us/
Recorded/Location : http://www.archive.org/details/BigBuckBunny_328
FileExtension_Invalid : ogg ogm opus
Video
ID : 734469776 (0x2BC71E90)
Format : Theora
Duration : 9 min 56 s
Bit rate : 512 kb/s
Width : 532 pixels
Height : 300 pixels
Display aspect ratio : 16:9
Frame rate : 24.000 FPS
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.134
Stream size : 36.4 MiB (78%)
Writing library : libTheora 3.2.1 (UTC 2008-10-20)
Audio
ID : 0 (0x0)
Format : Vorbis
Format settings, Floor : 1
Duration : 9 min 56 s
Bit rate mode : Variable
Bit rate : 128 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Compression mode : Lossy
Stream size : 9.10 MiB (20%)
Writing library : libVorbis 1.2 (UTC 2007-06-22)
These three are/were important -
Movie name : Big Buck Bunny
Writing application : Lavc52.35.0
Terms of use : http://creativecommons.org/licenses/by/3.0/us/
Recorded/Location : http://www.archive.org/details/BigBuckBunny_328
Are there any plans to do something like that ?
Hi,
I have installed variety in Ubuntu (both 16.04 and 18.04) with ppa and it stops working after installing Anaconda. If I type which python2
, I get /usr/bin/python2
, which looks nice, and therefore, shouldn't affect the working of Variety.
Do you have any idea on how to make it work? I attach the output log after calling variety from terminal:
variety.log
Thank you.
Variety still points to Launchpad for the main website and issue tracker (e.g. in the About and Preferences dialogs). @peterlevi Do we want to add notes redirecting the main issue tracker/site here or keep things as is going forward?
This is related to #6, for which I wasn't able to give an authoritative answer on yet.
Sample code here https://github.com/ming13/google-wallpaper-downloaders/
These both provide attribution, and seem to be licensed OK for wallpaper use.
Simple non-configurable downloaders will do.
That version had https://bugs.launchpad.net/variety/+bug/1754341 which is fixed in 0.6.7 and later.
According to https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html the .config/variety/ should only pertain to the configuration files and not anything else.
Presently, the .config/variety sub-directory has the following content -
~/.config/variety$ ls
Downloaded Fetched pencil_tile.png scripts variety.conf variety.log
Favorites history.txt plugins ui.conf variety_latest_default.conf wallpaper
It would be better at least IMHO to have everything except ui.conf and default.conf to move to ~/.cache/ especially Downloaded and Favorites as the contents will change overtime.
Arch Linux
GNOME Shell 3.28.1
variety 0.6.8
The tray icon isn't shown.
When changing wallpaper(next or previous), from command line, like using variety -n, previous log is being converted to unreadable characters and logging is continuing again normally
example
variety.txt
(i opened it using visual studio code)
Is the ppa going to get new versions?
Hi! I am trying to do this:
sudo nano /etc/lightdm/lightdm.conf
#session-cleanup-script=
session-cleanup-script=/etc/lightdm/setuploginwall.sh
and then do this:
#!/bin/bash
cp /home/robertpej/Pictures/variety-copied-wallpaper-. /usr/share/backgrounds/xxxxxx.png
However, because In my /pictures folder there are always two different wallpaper copied jpgs, each time wiht a different name.
Is it possible to only copy one image with a static name to /pictures for my lightdm script to work?
can you show me how? With two images it breaks my script..
Thanks if you can show me how to only have 1 static wallpaper copied
This is a clone of the Launchpad issue https://bugs.launchpad.net/variety/+bug/1337320 for more convenient commit tracking on GitHub.
Basically, the EOL for Python 2 is only 2 years away, and Debian 10/Buster is likely the last release that will ship with it in its repositories. This means that we should port Variety to Python 3 as soon as reasonable.
All of the libraries we depend on already have Python 3 equivalents, so this bit shouldn't be a blocker.
python-bs4 -> python3-bs4
python-cairo -> python3-cairo
python-configobj -> python3-configobj
python-dbus -> python3-dbus
python-gi-cairo -> python3-gi-cairo
python-pil -> python3-pil
python-pycurl -> python3-pycurl
python-requests -> python3-requests
Momentum is a popular web extension that substitute the browser's new tab landing page. It is available for Chrome and Firefox.
They have very nice images and it would be nice having Momentum as an additional image provider. Here below some resources I found online:
Could you please add an option to make the wallpapers scaled to the monitor's resolution.
For example, a 16:10 image displayed on a 16:9 monitor should be scaled to 14.4:9.
In the Deepin desktop, when you set a new wallpaper, it's saved to "/home/user/Pictures/Wallpapers". If you have Variety installed this makes that folder to grow endlessly without most users realising it.
It would be nice that, if the desktop was Deepin, Variety deleted that folder as soon as it changed wallpaper. If you agree with this design, I can write the fix myself.
Thank you.
Maybe you could change Ubuntu 18.04 lock-screen too.
dconf output:
/org/gnome/desktop/screensaver/color-shading-type 'solid'
/org/gnome/desktop/screensaver/picture-options 'zoom'
/org/gnome/desktop/screensaver/picture-uri 'file:///usr/share/background/El_Haouaria_by_Nusi_Nusi.jpg'
/org/gnome/desktop/screensaver/primary-color '#000000'
/org/gnome/desktop/screensaver/secondary-color '#000000'
I was looking at the shell script and it seems you could be better served by using /bin/sh unless there is some function of bash you can't do without.
See https://serverfault.com/questions/865874/bin-sh-vs-bin-bash-for-maximum-portability for why I'm telling/sharing the above.
I have (manually) copied all wallpapers of my choice to favourites folder, and deleted all the files in original folders, but it keeps downloading again (liked, unliked, and even those in favourites)
Can it itself manage from a log file
Make it more natural to enter digits in the donation amount box; normally one writes from left to right, not vice-versa starting at the end. Thanks
Installed variety today from Ubuntu 18.04 repository. vrty.org is unreachable.
I just noticed this repo yesterday when I saw lp:variety was syncing from here. Has Variety development officially moved from Launchpad to GitHub?
Just downloaded variety from the Arch Linux community repos and everything about the application seems to be working except for the fact that no wallpapers show on the background.
Variety steadily is occupying more and more memory. It reached about 600MB before I killed it and restarted it.
This is no longer allowed to third-party apps by Facebook: https://9to5mac.com/2018/04/25/limit-facebook-apps/
Like how for some wallpapers are being filtered based on their tags for some wallpaper sources, add an option to not show quotes from certain people or words in their content
Hi,
I'm working on creating a nix package for Variety - I got quite far but for some reason, I keep getting the following exception and I can't figure out where it's trying to look for the data directory:
Traceback (most recent call last):
File "/nix/store/xf6a3rm7icblm36p1m1q36r6a0q2dbyr-python2.7-variety/bin/..variety-wrapped-wrapped", line 40, in <module>
variety.main()
File "/nix/store/xf6a3rm7icblm36p1m1q36r6a0q2dbyr-python2.7-variety/lib/python2.7/site-packages/variety/__init__.py", line 218, in main
window.start(arguments)
File "/nix/store/xf6a3rm7icblm36p1m1q36r6a0q2dbyr-python2.7-variety/lib/python2.7/site-packages/variety/VarietyWindow.py", line 141, in start
self.prepare_config_folder()
File "/nix/store/xf6a3rm7icblm36p1m1q36r6a0q2dbyr-python2.7-variety/lib/python2.7/site-packages/variety/VarietyWindow.py", line 262, in prepare_config_folder
shutil.copy(varietyconfig.get_data_file("config", "variety.conf"),
File "/nix/store/xf6a3rm7icblm36p1m1q36r6a0q2dbyr-python2.7-variety/lib/python2.7/site-packages/variety_lib/varietyconfig.py", line 47, in get_data_file
return os.path.join(get_data_path(), *path_segments)
File "/nix/store/xf6a3rm7icblm36p1m1q36r6a0q2dbyr-python2.7-variety/lib/python2.7/site-packages/variety_lib/varietyconfig.py", line 64, in get_data_path
raise project_path_not_found
variety_lib.varietyconfig.project_path_not_found
This is when trying to execute the program, the installation seems to go well, but I can't figure out where it's trying to look for the config directory.
My python knowledge is quite limited so I may have said something wrong. I can also post the nix expression I'm using if that helps.
Thanks.
Looking at the code it seems the standard lib python module webbrowser
is used and not webkit.
variety/variety/FacebookHelper.py
Line 64 in 49c53d1
So, this is not an issue/feature request per se. I'm just putting this here to see if anyone is interested in porting Variety to the Android platform.
I installed Variety yesterday and after a while of running it freezes and causes some parts of ubuntu to freeze as well such as not being able to open a terminal and some other apps. although some apps do open such as nautilus. weird.
when variety crashes i cannot change wallpaper, or cause any of the preferences to change. i have to log out of ubuntu and back in again for variety (and the non responsive ubuntu apps) to work again as a killall won't work.
what other logs can I check to see what's going on?
latest version of variety from ppa.
ubuntu 14.04.
unity.
variety.log:
ERROR: 2014-05-09 10:28:42,998: parse_server_options() 'Could not parse Flickr serverside options, using defaults 60, 600'
Traceback (most recent call last):
File "/opt/extras.ubuntu.com/variety/variety/Downloader.py", line 96, in parse_server_options
options = self.parent.server_options[key]
KeyError: 'flickr'
Launchpad Details: #LP1317740 Christian Brooker - 2014-05-09 05:14:31 +0000
Hello,
thanks for the amazing app :)
I recently upgraded Fedora, on the process I had to un-install Variety cause was causing conflicts, after upgrade when I try to install variety through the Rpmfind as stated in the how-to install guide:
dnf install variety
Last metadata expiration check: 1:24:05 ago on Sat 05 May 2018 12:19:58 BST.
Error:
Problem: package variety-0.6.7-2.fc28.noarch requires pywebkitgtk, but none of the providers can be installed
- conflicting requests
- nothing provides libjavascriptcoregtk-1.0.so.0()(64bit) needed by pywebkitgtk-1.1.8-13.fc26.x86_64
So I tried to get the conflicting packages:
dnf search libjavascriptcoregtk-1.0
Last metadata expiration check: 1:24:48 ago on Sat 05 May 2018 12:19:58 BST.
No matches found
and
dnf install pywebkitgtk
Last metadata expiration check: 1:36:15 ago on Sat 05 May 2018 12:19:58 BST.
Error:
Problem: conflicting requests
- nothing provides libjavascriptcoregtk-1.0.so.0()(64bit) needed by pywebkitgtk-1.1.8-13.fc26.x86_64
I assume it's a distro thing, that they have taken out libjavascriptcoregtk-1.0
?
Is there a workaround?
Cheers.
Using Kubuntu 18.04 and latest Variety. I noticed that wallpapers were not changing so I opened it from Terminal and get the below error. I "unlocked widgets" and was able to move through wallpapers as expected.
Happy to help with anything further needed. Thanks!
`Error: org.freedesktop.DBus.Error.Failed
Widgets are locked
ERROR: 2018-05-06 21:39:34,131: set_desktop_wallpaper() 'Exception when calling set_wallpaper script: 2'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/variety/VarietyWindow.py", line 2436, in set_desktop_wallpaper
subprocess.check_call(["timeout", "--kill-after=5", "10", script, wallpaper, auto, original_file])
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['timeout', '--kill-after=5', '10', u'/home/jonathan/.config/variety/scripts/set_wallpaper', u'/home/jonathan/Dropbox/wallpapers/M42_HaGB_Spitzer_PortraitR.jpg', 'manual', u'/home/jonathan/Dropbox/wallpapers/M42_HaGB_Spitzer_PortraitR.jpg']' returned non-zero exit status 2
/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:860: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:860: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
`
I dunno if it is possible or not but it would be nice if a comment or something shares what an image is from by just hovering over an image or something. Right now, the way I come to know anything about the image is by downloading the image and then grepping the Description using exiftool. An example -
$ exiftool DuskyDolphin_EN-US11918143365_1920x1080.jpg | grep Description
Image Description : A pod of dusky dolphins at Kaikoura, New Zealand (© Terry Whittaker/Alamy)
Description : A pod of dusky dolphins at Kaikoura, New Zealand (© Terry Whittaker/Alamy)
I had a look at the script set_wallpaper and it doesn't seem to have any way to do that. This would probably be either thought as feature request or enhancement.
optparse has been deprecated since Python 2.7 / 3.2; we should consider switching to its successor argparse.
Initial work on this lives in the wip/argparse branch based off the Python 3 port - I'll probably go back to it after the initial Python 3 migration.
Now unsplash support browsing pictures by tag (ex: https://unsplash.com/search/photos/nature), wallpaper categories (ex: https://unsplash.com/wallpaper/1065396/desktop-wallpapers) and collections (ex: https://unsplash.com/collections/1889046/the-colour-purple).
It should be useful to add in Variety the capability to download from multiple unsplash sources, as it happens for wallhaven.cc urls.
This should be implemented in view of future reduction of image sources as stated in the last post in this page: https://peterlevi.com/variety/news/ but it will be usefull also if the actual sources will remain untouched :)
This is a fairly niche feature IMO, and I feel that lighter is better when it comes to dependencies.
Variety no longer starts with:
variety
Traceback (most recent call last):
File "/usr/bin/variety", line 38, in <module>
import variety
File "/usr/lib/python2.7/dist-packages/variety/__init__.py", line 111, in <module>
from variety import VarietyWindow
File "/usr/lib/python2.7/dist-packages/variety/VarietyWindow.py", line 74, in <module>
from variety.QuoteWriter import QuoteWriter
File "/usr/lib/python2.7/dist-packages/variety/QuoteWriter.py", line 17, in <module>
import cairo
File "/usr/lib/python2.7/dist-packages/cairo/__init__.py", line 1, in <module>
from ._cairo import * # noqa: F401,F403
ImportError: /usr/lib/python2.7/dist-packages/cairo/_cairo.x86_64-linux-gnu.so: undefined symbol: cairo_tee_surface_index
Installed by from generic and your PPA
It's now hardcoded to 250 in QuotesEngine
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.