Skip to content

Commit

Permalink
Merge branch 'v0.6.0-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
milouse committed Apr 10, 2023
2 parents 7f897a7 + c066b0a commit 667f992
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 74 deletions.
2 changes: 1 addition & 1 deletion chwall/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.12"
__version__ = "0.6.0"
2 changes: 1 addition & 1 deletion chwall/gui/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def make_general_pane(self):

environments = [("gnome", "Gnome, Pantheon, Budgie, …"),
("mate", "Mate"), ("xfce", "XFCE"),
("nitrogen", _("Use Nitrogen application"))]
("feh", _("Use Feh application"))]
prefbox = self.make_select_pref(
"general", "desktop", _("Desktop environment"),
environments, default="gnome")
Expand Down
2 changes: 2 additions & 0 deletions chwall/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def migrate_config(config):
if ld_path is not None and ld_path != "":
del config["general"]["lightdm_wall"]
config["general"]["shared"] = {"path": ld_path}
if config["general"].get("desktop") == "nitrogen":
config["general"]["desktop"] = "feh"
return config


Expand Down
20 changes: 6 additions & 14 deletions chwall/wallpaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,30 +183,22 @@ def _format_prop_error(prop):
raise ChwallWallpaperSetError(_format_prop_error("picture-options"))


def set_nitrogen_wallpaper(path):
def set_feh_wallpaper(path):
if path is None:
raise ChwallWallpaperSetError(_("No wallpaper path given"))
cmd = ["nitrogen", "--set-zoom-fill", "--set-color=#000000", "--save"]
cmd = ["feh", "--bg-fill", path]
# screen_info = (scr_number, scr_width, scr_height, scr_ratio, display)
screen_info = get_screen_config()
# wall_spec = (wall_width, wall_height, wall_ratio)
wall_spec = get_wall_config(path)
if wall_spec is None:
wall_spec = (0, 0, 1)
ratio_cmp = int(screen_info[3]) - int(wall_spec[2])
if screen_info[0] > 1 and ratio_cmp != 0:
err = 0
for screen_index in range(screen_info[0]):
head = "--head={}".format(screen_index)
err += subprocess.run(cmd + [head, path]).returncode
if err == 0:
return
raise ChwallWallpaperSetError(
_("Error while calling nitrogen for multihead display"))
err = subprocess.run(cmd + [path]).returncode
if screen_info[0] > 1 and ratio_cmp == 0:
cmd.insert(1, "--no-xinerama")
err = subprocess.run(cmd).returncode
if err != 0:
raise ChwallWallpaperSetError(
_("Error while calling nitrogen for single display"))
raise ChwallWallpaperSetError(_("Error while calling feh"))


def set_mate_screensaver(path):
Expand Down
32 changes: 14 additions & 18 deletions locale/chwall.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Chwall 0.5.12\n"
"Project-Id-Version: Chwall 0.6.0\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-03-22 13:53+0100\n"
"POT-Creation-Date: 2023-04-04 20:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -146,7 +146,7 @@ msgid "Time between each wallpaper change"
msgstr ""

#: chwall/gui/preferences.py:481
msgid "Use Nitrogen application"
msgid "Use Feh application"
msgstr ""

#: chwall/gui/preferences.py:483
Expand Down Expand Up @@ -356,7 +356,7 @@ msgid ""
"required."
msgstr ""

#: chwall/fetcher/unsplash.py:40 chwall/wallpaper.py:473
#: chwall/fetcher/unsplash.py:40 chwall/wallpaper.py:469
msgid "Picture"
msgstr ""

Expand Down Expand Up @@ -430,7 +430,7 @@ msgid "Remove {picture} as it's in block list"
msgstr ""

#: chwall/wallpaper.py:111 chwall/wallpaper.py:142 chwall/wallpaper.py:157
#: chwall/wallpaper.py:188 chwall/wallpaper.py:214
#: chwall/wallpaper.py:188 chwall/wallpaper.py:210
msgid "No wallpaper path given"
msgstr ""

Expand All @@ -449,53 +449,49 @@ msgid "Error while setting {desktop} {prop} property"
msgstr ""

#: chwall/wallpaper.py:205
msgid "Error while calling nitrogen for multihead display"
msgid "Error while calling feh"
msgstr ""

#: chwall/wallpaper.py:209
msgid "Error while calling nitrogen for single display"
msgstr ""

#: chwall/wallpaper.py:218
#: chwall/wallpaper.py:214
#, python-brace-format
msgid "screensaver {prop}"
msgstr ""

#: chwall/wallpaper.py:234
#: chwall/wallpaper.py:230
#, python-brace-format
msgid "Converting non RGB picture {picture}"
msgstr ""

#: chwall/wallpaper.py:291
#: chwall/wallpaper.py:287
#, python-brace-format
msgid ""
"Catch {error} exception while downloading {picture}. Wait {time} seconds "
"before retrying."
msgstr ""

#: chwall/wallpaper.py:300
#: chwall/wallpaper.py:296
#, python-brace-format
msgid "Retry NOW to download {picture}"
msgstr ""

#: chwall/wallpaper.py:341
#: chwall/wallpaper.py:337
msgid ""
"Impossible to build a new road map. It may be caused by a temporarily "
"network error. Please try again later."
msgstr ""

#: chwall/wallpaper.py:364
#: chwall/wallpaper.py:360
msgid ""
"Impossible to get any picture at this time. It may be caused by a "
"temporarily network error. Please try again later."
msgstr ""

#: chwall/wallpaper.py:472
#: chwall/wallpaper.py:468
#, python-brace-format
msgid "{title} by {author}"
msgstr ""

#: chwall/wallpaper.py:475
#: chwall/wallpaper.py:471
#, python-brace-format
msgid "{title} (on {source})"
msgstr ""
Expand Down
34 changes: 15 additions & 19 deletions locale/es/LC_MESSAGES/chwall.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Chwall 0.5.12\n"
"Project-Id-Version: Chwall 0.6.0\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-03-22 13:53+0100\n"
"POT-Creation-Date: 2023-04-04 20:49+0200\n"
"PO-Revision-Date: 2020-05-02 12:28+0000\n"
"Last-Translator: ruko <[email protected]>\n"
"Language-Team: Spanish <https://translations.umaneti.net/projects/chwall/"
Expand Down Expand Up @@ -149,8 +149,8 @@ msgid "Time between each wallpaper change"
msgstr "Tiempo entre cada cambio de fondo de pantalla"

#: chwall/gui/preferences.py:481
msgid "Use Nitrogen application"
msgstr "Usar la aplicación Nitrogen"
msgid "Use Feh application"
msgstr "Usar la aplicación Feh"

#: chwall/gui/preferences.py:483
msgid "Desktop environment"
Expand Down Expand Up @@ -359,7 +359,7 @@ msgid ""
"required."
msgstr ""

#: chwall/fetcher/unsplash.py:40 chwall/wallpaper.py:473
#: chwall/fetcher/unsplash.py:40 chwall/wallpaper.py:469
msgid "Picture"
msgstr "Imagen"

Expand Down Expand Up @@ -433,7 +433,7 @@ msgid "Remove {picture} as it's in block list"
msgstr ""

#: chwall/wallpaper.py:111 chwall/wallpaper.py:142 chwall/wallpaper.py:157
#: chwall/wallpaper.py:188 chwall/wallpaper.py:214
#: chwall/wallpaper.py:188 chwall/wallpaper.py:210
msgid "No wallpaper path given"
msgstr ""

Expand All @@ -452,53 +452,49 @@ msgid "Error while setting {desktop} {prop} property"
msgstr ""

#: chwall/wallpaper.py:205
msgid "Error while calling nitrogen for multihead display"
msgid "Error while calling feh"
msgstr ""

#: chwall/wallpaper.py:209
msgid "Error while calling nitrogen for single display"
msgstr ""

#: chwall/wallpaper.py:218
#: chwall/wallpaper.py:214
#, python-brace-format
msgid "screensaver {prop}"
msgstr ""

#: chwall/wallpaper.py:234
#: chwall/wallpaper.py:230
#, python-brace-format
msgid "Converting non RGB picture {picture}"
msgstr ""

#: chwall/wallpaper.py:291
#: chwall/wallpaper.py:287
#, python-brace-format
msgid ""
"Catch {error} exception while downloading {picture}. Wait {time} seconds "
"before retrying."
msgstr ""

#: chwall/wallpaper.py:300
#: chwall/wallpaper.py:296
#, python-brace-format
msgid "Retry NOW to download {picture}"
msgstr ""

#: chwall/wallpaper.py:341
#: chwall/wallpaper.py:337
msgid ""
"Impossible to build a new road map. It may be caused by a temporarily "
"network error. Please try again later."
msgstr ""

#: chwall/wallpaper.py:364
#: chwall/wallpaper.py:360
msgid ""
"Impossible to get any picture at this time. It may be caused by a "
"temporarily network error. Please try again later."
msgstr ""

#: chwall/wallpaper.py:472
#: chwall/wallpaper.py:468
#, python-brace-format
msgid "{title} by {author}"
msgstr ""

#: chwall/wallpaper.py:475
#: chwall/wallpaper.py:471
#, python-brace-format
msgid "{title} (on {source})"
msgstr ""
Expand Down
38 changes: 17 additions & 21 deletions locale/fr/LC_MESSAGES/chwall.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Chwall 0.5.12\n"
"Project-Id-Version: Chwall 0.6.0\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-03-22 13:53+0100\n"
"POT-Creation-Date: 2023-04-04 20:49+0200\n"
"PO-Revision-Date: 2023-03-22 13:31+0100\n"
"Last-Translator: Étienne Deparis <[email protected]>\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -149,8 +149,8 @@ msgid "Time between each wallpaper change"
msgstr "Délai entre chaque changement de fond d’écran"

#: chwall/gui/preferences.py:481
msgid "Use Nitrogen application"
msgstr "Utiliser l’application Nitrogen"
msgid "Use Feh application"
msgstr "Utiliser l’application Feh"

#: chwall/gui/preferences.py:483
msgid "Desktop environment"
Expand Down Expand Up @@ -377,7 +377,7 @@ msgstr ""
"Unsplash a arrêté de fournir un flux RSS. De ce fait, le paramètre "
"‘access_key’ est désormais requis."

#: chwall/fetcher/unsplash.py:40 chwall/wallpaper.py:473
#: chwall/fetcher/unsplash.py:40 chwall/wallpaper.py:469
msgid "Picture"
msgstr "Image"

Expand Down Expand Up @@ -459,7 +459,7 @@ msgid "Remove {picture} as it's in block list"
msgstr "Supprime {picture} comme elle est sur la liste de blocage"

#: chwall/wallpaper.py:111 chwall/wallpaper.py:142 chwall/wallpaper.py:157
#: chwall/wallpaper.py:188 chwall/wallpaper.py:214
#: chwall/wallpaper.py:188 chwall/wallpaper.py:210
msgid "No wallpaper path given"
msgstr "Aucun chemin vers un fond d’écran donné"

Expand All @@ -478,25 +478,21 @@ msgid "Error while setting {desktop} {prop} property"
msgstr "Erreur durant la configuration de la propriété {prop} de {desktop}"

#: chwall/wallpaper.py:205
msgid "Error while calling nitrogen for multihead display"
msgstr "Erreur lors de l’appel à nitrogen pour un affichage multi écran"
#, fuzzy
msgid "Error while calling feh"
msgstr "Erreur lors de l’appel à feh"

#: chwall/wallpaper.py:209
msgid "Error while calling nitrogen for single display"
msgstr ""
"Erreur lors de l’appel à nitrogen pour un affichage sur un unique écran"

#: chwall/wallpaper.py:218
#: chwall/wallpaper.py:214
#, python-brace-format
msgid "screensaver {prop}"
msgstr "{prop} de l’écran de veille"

#: chwall/wallpaper.py:234
#: chwall/wallpaper.py:230
#, python-brace-format
msgid "Converting non RGB picture {picture}"
msgstr "Conversion de l’image non RGB {picture}"

#: chwall/wallpaper.py:291
#: chwall/wallpaper.py:287
#, python-brace-format
msgid ""
"Catch {error} exception while downloading {picture}. Wait {time} seconds "
Expand All @@ -505,33 +501,33 @@ msgstr ""
"Récupération de l’exception {error} durant le téléchargement de {picture}. "
"Attente de {time} secondes avant de réessayer."

#: chwall/wallpaper.py:300
#: chwall/wallpaper.py:296
#, python-brace-format
msgid "Retry NOW to download {picture}"
msgstr "Essaye MAINTENANT de télécharger {picture}"

#: chwall/wallpaper.py:341
#: chwall/wallpaper.py:337
msgid ""
"Impossible to build a new road map. It may be caused by a temporarily "
"network error. Please try again later."
msgstr ""
"Impossible de construire une nouvelle liste d’attente. Cela peut être dû à "
"une erreur temporaire de réseau. Merci de réessayer ultérieurement."

#: chwall/wallpaper.py:364
#: chwall/wallpaper.py:360
msgid ""
"Impossible to get any picture at this time. It may be caused by a "
"temporarily network error. Please try again later."
msgstr ""
"Impossible de récupérer une image pour l’instant. Cela peut être dû à une "
"erreur temporaire de réseau. Merci de réessayer ultérieurement."

#: chwall/wallpaper.py:472
#: chwall/wallpaper.py:468
#, python-brace-format
msgid "{title} by {author}"
msgstr "{title} de {author}"

#: chwall/wallpaper.py:475
#: chwall/wallpaper.py:471
#, python-brace-format
msgid "{title} (on {source})"
msgstr "{title} (sur {source})"
Expand Down

0 comments on commit 667f992

Please sign in to comment.