Skip to content

Commit

Permalink
version 35 (#117)
Browse files Browse the repository at this point in the history
* dont reset blur on disable() if never enabled #113
* remove Lang and Mainloop refs in prefs and utils
* migrate to GObject from Lang module, fix build
* add image gallery
* add support for GNOME 41
* add thumbnails to gallery (faster loading)
* Add Japanese translation (#122) #14 thanks to @nexryai
* update README and metadata
* minor fix for GNOME 40+ on 1080p or lower screens

Co-authored-by: graubs <[email protected]>
Co-authored-by: Cen <[email protected]>
Co-authored-by: nexryai <[email protected]>
  • Loading branch information
4 people authored Sep 26, 2021
1 parent 29c0ec1 commit 294685b
Show file tree
Hide file tree
Showing 26 changed files with 1,395 additions and 493 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ [email protected]
*.log
#Settings.ui#
translations.txt
Settings.ui.h
Settings4.ui.h
carousel.ui.h
carousel4.ui.h
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# GNOME Shell extension - Bing Wallpaper

A lightweight GNOME shell extension to syncs your desktop wallpaper to today's Microsoft Bing image of the day (the image you see when you visit Bing.com). The intention of this extension is to just do what it needs to do and stay out of your way.
A lightweight extension that brings some color to your desktop by syncing your desktop and lockscreen wallpapers with today's Microsoft Bing image of the day (the image you see when you visit Bing.com). The intention of this extension is to just do what it needs to do and stay out of your way, with a few optional features to improve quality-of-life.

*Disclaimer*: this extension is unofficial and not affiliated with Bing or
Microsoft in any way. Images are protected by copyright, and are licensed only
for use as wallpapers.
![Screenshot](/screenshot/notification.png)

This extension is based extensively on the NASA APOD extension by [Elinvention](https://github.com/Elinvention)
and inspired by Bing Desktop WallpaperChanger by [Utkarsh Gupta](https://github.com/UtkarshGpta). As featured on [OMG! Ubuntu](https://www.omgubuntu.co.uk/2017/07/bing-wallpaper-changer-gnome-extension). Lockscreen blur code is based on [Pratap-Kumar's extension.](https://github.com/PRATAP-KUMAR/Control_Blur_Effect_On_Lock_Screen)
Expand All @@ -15,16 +13,16 @@ Also, check out my related [Google Earth View wallpaper extension](https://githu

## Features

![Screenshot](/screenshot/popup.png)

* Fetches the Bing [Image of the Day](https://www.microsoft.com/en-us/bing/bing-wallpaper) and sets as both lock screen (and now it's dialog also) and desktop wallpaper (these are both optional)
* Fetches the Bing [Image of the Day](https://www.microsoft.com/en-us/bing/bing-wallpaper) and sets as both lock screen and desktop wallpaper
* Only attempts to download wallpapers when they have been updated - doesn't poll continuously
* Optionally clean up Wallpaper directory after between 1 and 7 days (delete oldest first), or keep them forever
* Optionally delete old images after a week, or keep them forever
* Optionally force a specific region (i.e. what Bing calls a "market", some Wallpapers may relate to local holidays or locations)
* Language support: English (en), German (de), Dutch (nl), Italian (it), Polish (pl), Chinese (zh_CN), French (fr_FR), Portuguese (pt, pt_BR), Russian (ru_RU), Spanish (es), Korean (ko, ko_KR, ko_KP), Indonesian (id), Catalan (ca), Norwegian Bokmål (nb) & Nynorsk (ni), Swedish (sv), Arabic (ar) and Hungarian (hu) - a HUGE thanks to the translators
* image preview in menus & ability to manually set wallpapers individually or copy image to clipboard
* NEW: a selection of different theme-aware indicator (tray) icons to choose
* NEW: override the GNOME (GDM3) lockscreen blur (requested feature #77)
* Language support: English (en), German (de), Dutch (nl), Italian (it), Polish (pl), Chinese (zh_CN), French (fr_FR), Portuguese (pt, pt_BR), Russian (ru_RU), Spanish (es), Korean (ko, ko_KR, ko_KP), Indonesian (id), Catalan (ca), Norwegian Bokmål (nb) & Nynorsk (ni), Swedish (sv), Arabic (ar), Hungarian (hu) and Japanese (ja) - a HUGE thanks to the translators
* Image preview in menus & ability to manually set wallpapers individually or copy image to clipboard
* A selection of different theme-aware indicator (tray) icons to choose (or hide it completely)
* Override the lockscreen blur
* NEW: shuffle/randomise wallpapers at adjustable intervals (including from your stored Bing images)
* NEW: image gallery to view, select and manage stored images #115

## TODO

Expand All @@ -38,7 +36,7 @@ Also, check out my related [Google Earth View wallpaper extension](https://githu

## Requirements

GNOME 3.28+ (Ubuntu Gnome 18.04+, Fedora 23+, older versions of the extension work with 3.18+, but are no longer supported). Blur control requires GNOME 3.36+, and may be unreliable on 3.36.3 or below.
GNOME 3.28+ (Ubuntu Gnome 18.04+, Fedora 23+, older versions of the extension work with 3.18+, but are no longer supported). Blur control requires GNOME 3.36+, and may be unreliable on 3.36.3 or below. GNOME 40+ is still beta quality.

## Install

Expand Down Expand Up @@ -71,12 +69,12 @@ Please include logs from your journal when submitting bug notices (make sure not

## Screenshots

![Screenshot](/screenshot/notification.png)
Image gallery:
![Settings](/screenshot/settings5.png)

![Settings](/screenshot/settings.png)
![Settings](/screenshot/settings2.png)
![Settings](/screenshot/settings3.png)
![Settings](/screenshot/settings4.png)
Preferences:
![Settings](/screenshot/settings.png)![Settings](/screenshot/settings2.png)
![Settings](/screenshot/settings3.png)![Settings](/screenshot/settings4.png)


Examples of adjustable blur on the lockscreen:
Expand All @@ -87,9 +85,13 @@ Examples of adjustable blur on the lockscreen:

Do you like this extension and want to show that you appreciate the work that goes into adding new features and keeping it maintained? Please consider buying me a coffee on [GitHub Sponsors](https://github.com/sponsors/neffo) or on [Flattr](https://flattr.com/@neffo).

## Disclaimer

This extension is unofficial and not affiliated with Bing or Microsoft in any way. Images are protected by copyright, and are licensed only for use as wallpapers.

## Special Thanks

I'd like to give a special shout out to those who have [contributed code and translations](https://github.com/neffo/bing-wallpaper-gnome-extension/graphs/contributors) as well as everyone who has reported bugs or provided feedback and suggestions for improvements.
I'd like to give a special shout out to those who have [contributed code and translations](https://github.com/neffo/bing-wallpaper-gnome-extension/graphs/contributors) as well as everyone who has reported bugs or provided feedback and suggestions for improvements. Also, thanks to Microsoft for this great API and wallpaper collection.

## License

Expand Down
44 changes: 0 additions & 44 deletions Settings.ui.h

This file was deleted.

44 changes: 0 additions & 44 deletions Settings4.ui.h

This file was deleted.

8 changes: 6 additions & 2 deletions blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var blur_strength = 2;
var blur_brightness = 55;
var debug = false;

let blurEnabled = false;
var blurMode = whichVersion();

function log(msg) {
Expand Down Expand Up @@ -63,6 +64,7 @@ var Blur = class Blur {
let effect = new Shell.BlurEffect({ brightness: blur_brightness * 0.01, sigma: blur_strength * themeContext.scale_factor / 5 }); // fix me, should this be /5?
this._scaleChangedId = themeContext.connect('notify::scale-factor', () => { effect.sigma = blur_strength * themeContext.scale_factor / 5; });
widget.add_effect(effect);
blurEnabled = true;
}

_do_blur_v2(monitorIndex) {
Expand All @@ -74,8 +76,8 @@ var Blur = class Blur {
brightness: blur_brightness * 0.01,
sigma: blur_strength * themeContext.scale_factor,
});
}

}
blurEnabled = true;
}

set_blur_strength(value) {
Expand Down Expand Up @@ -119,6 +121,8 @@ var Blur = class Blur {
}

_disable() {
if (blurEnabled == false) // nothing to do, don't clash without other extensions that do the same
return;
log("_lockscreen_blur_disable() called");
if (blurMode == 1) {
UnlockDialog.prototype._createBackground = _createBackground;
Expand Down
10 changes: 6 additions & 4 deletions buildzip.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

glib-compile-schemas schemas/
intltool-extract --type=gettext/glade Settings.ui
intltool-extract --type=gettext/glade Settings4.ui
xgettext -k -k_ -kN_ -o locale/BingWallpaper.pot Settings.ui.h Settings4.ui.h extension.js prefs.js blur.js utils.js convenience.js --from-code=UTF-8
intltool-extract --type=gettext/glade ui/Settings.ui
intltool-extract --type=gettext/glade ui/Settings4.ui
intltool-extract --type=gettext/glade ui/carousel.ui
intltool-extract --type=gettext/glade ui/carousel4.ui
xgettext -k -k_ -kN_ -o locale/BingWallpaper.pot Settings.ui.h Settings4.ui.h extension.js prefs.js blur.js utils.js convenience.js carousel.ui carousel4.ui --from-code=UTF-8

echo "Translation status" > translations.txt
for D in locale/*; do
Expand All @@ -17,4 +19,4 @@ rm [email protected]

zip -r [email protected] *

zip -d [email protected] screenshot/* screenshot buildzip.sh Settings.ui.h npm-debug.log icons/original/* .* translations.txt
zip -d [email protected] screenshot/* screenshot buildzip.sh npm-debug.log icons/original/* .* translations.txt *.h package.json
Loading

0 comments on commit 294685b

Please sign in to comment.