Skip to content

Commit

Permalink
Improving imports
Browse files Browse the repository at this point in the history
  • Loading branch information
anufrievroman committed Aug 26, 2023
1 parent 60ce866 commit bd53bcf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
2 changes: 0 additions & 2 deletions waypaper/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import sys

from waypaper.app import App
from waypaper.changer import change_wallpaper
from waypaper.config import cf
Expand Down
11 changes: 4 additions & 7 deletions waypaper/app.py
Original file line number Diff line number Diff line change
@@ -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"""
Expand Down
3 changes: 1 addition & 2 deletions waypaper/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -15,4 +15,3 @@
parser.add_argument("--backend", help="specify which backend to use to set wallpaper.", choices=BACKEND_OPTIONS)

args = parser.parse_args()

5 changes: 1 addition & 4 deletions waypaper/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit bd53bcf

Please sign in to comment.