From bd53bcf001f8162ec2337317f4e9069143b2de1b Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 26 Aug 2023 12:27:14 +0900 Subject: [PATCH] Improving imports --- waypaper/__main__.py | 2 -- waypaper/app.py | 11 ++++------- waypaper/arguments.py | 3 +-- waypaper/config.py | 5 +---- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/waypaper/__main__.py b/waypaper/__main__.py index 70d1bae..a66ac18 100644 --- a/waypaper/__main__.py +++ b/waypaper/__main__.py @@ -1,5 +1,3 @@ -import sys - from waypaper.app import App from waypaper.changer import change_wallpaper from waypaper.config import cf diff --git a/waypaper/app.py b/waypaper/app.py index ea0f93e..01f498c 100644 --- a/waypaper/app.py +++ b/waypaper/app.py @@ -1,19 +1,16 @@ """Module that runs GUI app""" +from waypaper.changer import change_wallpaper +from waypaper.config import cf +from waypaper.options import FILL_OPTIONS, BACKEND_OPTIONS import threading -import gi import os -import subprocess -import configparser import distutils.spawn +import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GdkPixbuf, Gdk, GLib -from waypaper.changer import change_wallpaper -from waypaper.config import cf -from waypaper.options import FILL_OPTIONS, BACKEND_OPTIONS - def get_image_paths(root_folder, include_subfolders=False, depth=None): """Get a list of file paths depending of weather we include subfolders and how deep we scan""" diff --git a/waypaper/arguments.py b/waypaper/arguments.py index 348d5dd..4f85d89 100644 --- a/waypaper/arguments.py +++ b/waypaper/arguments.py @@ -6,7 +6,7 @@ parser = argparse.ArgumentParser( prog = 'waypaper', - description = 'GUI wallpaper setter for Wayland and X11. It works as a frontend for feh, swaybg, and swww.', + description = 'GUI wallpaper setter for Wayland and X11. It works as a frontend for feh, swaybg, wallutils, and swww.', epilog = 'For more information, visit: https://github.com/anufrievroman/waypaper') parser.add_argument("-v", "--version", help="print version of the program", action="store_true") @@ -15,4 +15,3 @@ parser.add_argument("--backend", help="specify which backend to use to set wallpaper.", choices=BACKEND_OPTIONS) args = parser.parse_args() - diff --git a/waypaper/config.py b/waypaper/config.py index 42e1450..2dee6dc 100644 --- a/waypaper/config.py +++ b/waypaper/config.py @@ -2,11 +2,8 @@ import configparser import pathlib -import getopt -import sys import os -from waypaper.options import FILL_OPTIONS, BACKEND_OPTIONS from waypaper.arguments import args @@ -71,7 +68,7 @@ def save(self): def read_parameters_from_user_arguments(self): - """Read user arguments that were provided at the run. These values take priority over config.ini""" + """Read user arguments provided at the run. These values take priority over config.ini""" if args.backend: self.backend = args.backend if args.fill: