Skip to content

Commit 355f6a9

Browse files
committed
Improving error messages
1 parent ef598e0 commit 355f6a9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

waypaper/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from waypaper.arguments import args
1010

1111

12-
__version__ = "1.9.2"
12+
__version__ = "2.0"
1313

1414

1515
def run():

waypaper/changer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def change_wallpaper(image_path, fill_option, color, backend, monitor):
1717
subprocess.Popen(["killall", "swaybg"])
1818
time.sleep(0.005)
1919
except Exception as e:
20-
print(e)
20+
print(f"{ERR_KILL} {e}")
2121
command = ["swaybg"]
2222
# if monitor != "All":
2323
# command.extend(["-o", monitor])
@@ -40,7 +40,7 @@ def change_wallpaper(image_path, fill_option, color, backend, monitor):
4040
subprocess.Popen(["killall", "swaybg"])
4141
time.sleep(0.005)
4242
except Exception as e:
43-
print(e)
43+
print(f"{ERR_KILL} {e}")
4444
subprocess.Popen(["swww", "init"])
4545
command = ["swww", "img", image_path]
4646
command.extend(["--resize", fill])

waypaper/translation_en.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
MSG_CHANGEFOLDER = "Change wallpaper folder"
1919
MSG_CHOOSEFOLDER = "Please choose a folder"
2020
MSG_CACHING = "Caching wallpapers..."
21-
MSG_SETWITH = "Wallpaper was set with"
21+
MSG_SETWITH = "Sent command to set wallpaper was set with"
2222

2323
MSG_HELP = "Waypaper's hotkeys:\n\nhjkl - Navigation (←↓↑→)\nf - Change wallpaper folder\n"
2424
MSG_HELP += "g - Scroll to top\nG - Scroll to bottom\nR - Set random wallpaper\nr - Recache wallpapers\n"
@@ -34,6 +34,7 @@
3434
ERR_WALL = "Error changing wallpaper:"
3535
ERR_NOTSUP = "The backend is not supported:"
3636
ERR_DISP = "Error determining monitor names:"
37+
ERR_KILL = "Warning related to killall:"
3738

3839
TIP_SUBFOLDER = "Include/exclude images in subfolders"
3940
TIP_REFRESH = "Recache the folder of images"

0 commit comments

Comments
 (0)