Skip to content

Commit

Permalink
Merge pull request #242 from neffo/version-50
Browse files Browse the repository at this point in the history
Version 50
  • Loading branch information
neffo authored Sep 29, 2024
2 parents da7bffd + 199db57 commit 074cda6
Show file tree
Hide file tree
Showing 44 changed files with 1,668 additions and 784 deletions.
57 changes: 53 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bring some color to your GNOME desktop by syncing your desktop and lockscreen wa

[![Get it on GNOME extensions](/screenshot/get_it_on_gnome_extensions.png)](https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/) [![<3 Sponsor this project on GitHub <3](/screenshot/sponsor.png)](https://github.com/sponsors/neffo)

![Screenshot](/screenshot/notification.png)
![Screenshot](/screenshot/overview.jpg)

As featured on [OMG! Ubuntu](https://www.omgubuntu.co.uk/2017/07/bing-wallpaper-changer-gnome-extension).

Expand All @@ -18,10 +18,44 @@ Also, check out my related [Google Earth View wallpaper extension](https://githu
* Image gallery to view, select and curate stored images
* Optionally delete old images after a week, or you can keep (and curate) them forever
* Override the lockscreen blur (NEW: lockscreen blur is now dynamic!)
* Language support: English (en), German (de), Dutch (nl), Italian (it), Polish (pl), Chinese (zh_CN, zh_TW), French (fr_FR), Portuguese (pt, pt_BR), Ukrainian (uk), Russian (ru_RU), Spanish (es), Korean (ko), Indonesian (id), Catalan (ca), Norwegian Bokmål (nb) & Nynorsk (nn), Swedish (sv), Arabic (ar), Hungarian (hu), Japanese (ja), Czech (cs_CZ), Finnish (fi_FI) and Turkish (tr) - a HUGE thanks to the translators
* Language support: English (en), German (de), Dutch (nl), Italian (it), Polish (pl), Chinese (zh_CN, zh_TW), French (fr_FR), Portuguese (pt, pt_BR), Ukrainian (uk), Russian (ru_RU), Spanish (es), Korean (ko), Indonesian (id), Catalan (ca), Norwegian Bokmål (nb) & Nynorsk (nn), Swedish (sv), Arabic (ar), Hungarian (hu), Japanese (ja), Czech (cs_CZ), Finnish (fi_FI) and Turkish (tr), Persian (fa_ir) - 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)

## Quickstart guide

* Install from [GNOME extensions](https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/), by default your wallpaper will be synced to the current Bing image of the day - if that's all you want you don't have to do anymore, everything is automatic
* Bing Wallpaper (by default) builds a collection of images over time (this can be disabled if required)

### Control bar
![Bing Wallpaper menu control bar](/screenshot/controlbar.png)

* 🤍 - Favorite/unfavorite current image (can be used to shuffle only favorite images and favorites are never deleted automatically)
* 🗑️ - Trash/untrash current image (exclude from shuffle selection or optionally deleted from disk)
* ⏪ - select previous day's image (in date order)
* ⏩ - select next day's image (in date order)
* ⏭️ - select today's image (skip to current)
* 🎲 - I'm feeling lucky, show me a random image (by default you should have at least 8 images available, curated with favorite and trash buttons)

### Quick settings
![Bing Wallpaper menu control bar](/screenshot/quicksettings.png)

* Always show new images - when a new Bing wallpaper is available switch to it immediately
* Image shuffle mode - switch to a random image at user defined intervals (default once per day or once per startup)
* Image shuffle only favorites - only select favorite images (🤍), by default 'trashed' images are always excluded
* Image shuffle only UHD resolution - occasionally some images are not UHD, exclude these from selection

### Gallery

![Gallery item](/screenshot/gallery.png)

The 4 buttons in the gallery (3rd page in the preferences) do have tool-tips but these do the following:
- Favorite - favorite this image (equivalent to doing this via the control bar)
- Apply - set this image as wallpaper
- View - open image in image viewer
- Info - open the Bing description of the image
- Trash - trash the image

## TODO

* add more languages (#14) - [please help if you can](https://github.com/neffo/bing-wallpaper-gnome-extension/issues/14)
Expand All @@ -33,10 +67,25 @@ Also, check out my related [Google Earth View wallpaper extension](https://githu
* Bing may detect your location incorrectly (and force a locale as above) - if you see this, please let me know what Bing.com itself does
* GNOME Shell themes can break some GNOME popup menu elements (toggle switches for example). This impacts GNOME more generally, not just this extension. Double check you are running latest versions of your themes (or disable them).

## Requirements
## System Requirements

GNOME 3.36+ or 40+ (Ubuntu 20.04 LTS or later, older versions of the extension work with 3.18+, but are no longer supported).

## Package dependencies

Below packages are required to build the extension

```
npm
gettext
intltool
zip
```
For Ubuntu you can hit below command to install
```
sudo apt install npm gettext intltool zip -y
```

## Install

[Install from extensions.gnome.org](https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/)
Expand All @@ -53,7 +102,7 @@ sh install.sh

## Enable debug logging

Enable debug logging through the exptension preferences 'Debug options' tab or if unable to open preferences you can enable debugging using dconf-editor with this command:
Enable debug logging through the extension preferences 'Debug options' tab or if unable to open preferences you can enable debugging using dconf-editor with this command:
```
GSETTINGS_SCHEMA_DIR=$HOME/.local/share/gnome-shell/extensions/[email protected]/schemas dconf-editor /org/gnome/shell/extensions/bingwallpaper/
```
Expand Down
7 changes: 4 additions & 3 deletions blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var shellVersionMajor = parseInt(Config.PACKAGE_VERSION.split('.')[0]);
var shellVersionMinor = parseInt(Config.PACKAGE_VERSION.split('.')[1]);
var shellVersionPoint = parseInt(Config.PACKAGE_VERSION.split('.')[2]);

var blurField = shellVersionMajor >= 46 ? "radius" : "sigma";
// default BWP mild blur
var BWP_BLUR_SIGMA = 2;
var BWP_BLUR_BRIGHTNESS = 55;
Expand Down Expand Up @@ -50,7 +51,7 @@ export function _updateBackgroundEffects_BWP(monitorIndex) {
if (effect) {
effect.set({ // GNOME defaults when login prompt is visible
brightness: BLUR_BRIGHTNESS,
sigma: BLUR_SIGMA * themeContext.scale_factor,
[blurField]: BLUR_SIGMA * themeContext.scale_factor,
});
}
}
Expand All @@ -59,7 +60,7 @@ export function _updateBackgroundEffects_BWP(monitorIndex) {
if (effect) {
effect.set({ // adjustable blur when clock is visible
brightness: BWP_BLUR_BRIGHTNESS * 0.01, // we use 0-100 rather than 0-1, so divide by 100
sigma: BWP_BLUR_SIGMA * themeContext.scale_factor,
[blurField]: BWP_BLUR_SIGMA * themeContext.scale_factor,
});
}
}
Expand Down Expand Up @@ -91,7 +92,7 @@ export function _clampValue(value) {
export default class Blur {
constructor() {
this.enabled = false;
log('Bing Wallpaper adjustable blur is '+supportedVersion()?'available':'not available');
log('Bing Wallpaper adjustable blur is '+(supportedVersion()?'available':'not available'));
}

set_blur_strength(value) {
Expand Down
6 changes: 5 additions & 1 deletion buildzip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ echo "# Translation status of statements as at $DATE:" > translations.txt
MSGCOUNT=`cat locale/BingWallpaper.pot | grep -c -e msgid`
for D in locale/*; do
if [ -d "${D}" ]; then
msgfmt --template=BingWallpaper.pot --statistics --verbose -o "${D}/LC_MESSAGES/BingWallpaper.mo" "${D}/LC_MESSAGES/BingWallpaper.po" 2>&1 | cat >> translations.txt
msgfmt --template=BingWallpaper.pot --statistics --verbose -o "${D}/LC_MESSAGES/BingWallpaper.mo" "${D}/LC_MESSAGES/BingWallpaper.po" 2>&1 | cat >> translations.txt
# your processing here
if [ $? -ne 0 ]; then
echo "ERROR processing $D translations:"
msgfmt --template=BingWallpaper.pot -o "${D}/LC_MESSAGES/BingWallpaper.mo" "${D}/LC_MESSAGES/BingWallpaper.po"
fi
fi
done

Expand Down
2 changes: 1 addition & 1 deletion carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class Carousel {
this.log('Delete requested for '+filename);
Utils.deleteImage(filename);
Utils.setImageHiddenStatus(this.settings, image.urlbase, true);
Utils.cleanupImageList(this.settings); // hide image instead
Utils.purgeImages(this.settings); // hide image instead
widget.get_parent().get_parent().set_visible(false); // bit of a hack
if (this.callbackfunc)
this.callbackfunc();
Expand Down
Loading

0 comments on commit 074cda6

Please sign in to comment.