feat: validate whether geeqie is installed

This commit is contained in:
2026-07-15 14:49:45 +03:00
parent a80aa34c62
commit 6a9ffbf96a
2 changed files with 21 additions and 1 deletions
+12 -1
View File
@@ -16,12 +16,19 @@ from textual.binding import BindingType
from textual.widgets import Footer, Header, Label
from random_file_picker.core import collect_files, move_file_to_move_folder, upload_file
from random_file_picker.openers import open_file_in_dolphin, open_file_with_default_app, open_file_with_geeqie
from random_file_picker.openers import (
is_geeqie_available,
open_file_in_dolphin,
open_file_with_default_app,
open_file_with_geeqie,
)
IMG_EXTENSIONS = [
".jpg", ".jpeg", ".webp", ".png", ".gif",
]
GEEQIE_AVAILABLE = is_geeqie_available()
class Args(tap.TypedArgs):
file_size: int = tap.arg("-s", default=10, help="Maximum file size in MB")
directory: str = tap.arg("-d", default=".", help="Directory to search for files")
@@ -219,6 +226,10 @@ class MenuApp(App[None]):
def main_with_tap(args: Args) -> None:
if args.use_geeqie and not GEEQIE_AVAILABLE:
print("❌ Geeqie is not available on this system. Please install it or run without --use-geeqie.")
return
app = MenuApp(
directory=args.directory,
file_limit=args.file_size,