mirror of
https://github.com/anufrievroman/waypaper.git
synced 2024-11-22 15:46:39 +03:00
Implementing none backend
This is to use waypaper as a filepicker, as explained in #33
This commit is contained in:
parent
4f8cc3ad44
commit
9b3d09f474
@ -222,7 +222,7 @@ class App(Gtk.Window):
|
||||
|
||||
def check_backends(self):
|
||||
"""Before running the app, check which backends are installed or show the error"""
|
||||
if not self.cf.installed_backends:
|
||||
if len(self.cf.installed_backends) == 1:
|
||||
self.show_message(self.txt.err_backend)
|
||||
exit()
|
||||
|
||||
|
@ -84,6 +84,9 @@ def change_wallpaper(image_path, cf, monitor, txt):
|
||||
subprocess.Popen(["setwallpaper", "--mode", fill, image_path])
|
||||
print(f"{txt.msg_setwith} {cf.backend}")
|
||||
|
||||
elif cf.backend == "none":
|
||||
pass
|
||||
|
||||
else:
|
||||
print(f"{txt.err_notsup} {cf.backend}")
|
||||
|
||||
|
@ -55,8 +55,10 @@ def get_random_file(backend, folder, include_subfolders, include_hidden=False):
|
||||
|
||||
def check_installed_backends():
|
||||
"""Check which backends are installed in the system"""
|
||||
installed_backends = []
|
||||
installed_backends = ["none"]
|
||||
for backend in BACKEND_OPTIONS:
|
||||
if backend == "none":
|
||||
continue
|
||||
if backend == "wallutils":
|
||||
binary_name = "setwallpaper"
|
||||
else:
|
||||
|
@ -1,4 +1,4 @@
|
||||
BACKEND_OPTIONS = ["swaybg", "swww", "feh", "wallutils"]
|
||||
BACKEND_OPTIONS = ["none", "swaybg", "swww", "feh", "wallutils"]
|
||||
FILL_OPTIONS = ["fill", "stretch", "fit", "center", "tile"]
|
||||
SORT_OPTIONS = ["name", "namerev", "date", "daterev"]
|
||||
SORT_DISPLAYS = {
|
||||
|
Loading…
Reference in New Issue
Block a user