Added image loading config. Added auto-load check based on RTT and EDR.

This commit is contained in:
Mark Qvist 2026-09-06 13:37:35 +02:00
parent 6451d7fa7f
commit 0db7d4bdaa
No known key found for this signature in database
4 changed files with 63 additions and 1 deletions

View file

@ -994,6 +994,20 @@ class NomadNetworkApp:
else:
raise ValueError("The selected Text UI color mode is invalid")
if not "image_loading" in self.config["textui"]:
self.config["textui"]["image_loading"] = nomadnet.ui.TextUI.IMGLOAD_AUTO
else:
if self.config["textui"]["image_loading"].lower() == "never":
self.config["textui"]["image_loading"] = nomadnet.ui.TextUI.IMGLOAD_NEVER
elif self.config["textui"]["image_loading"].lower() == "manual":
self.config["textui"]["image_loading"] = nomadnet.ui.TextUI.IMGLOAD_MANUAL
elif self.config["textui"]["image_loading"].lower() == "auto":
self.config["textui"]["image_loading"] = nomadnet.ui.TextUI.IMGLOAD_AUTO
elif self.config["textui"]["image_loading"].lower() == "always":
self.config["textui"]["image_loading"] = nomadnet.ui.TextUI.IMGLOAD_ALWAYS
else:
raise ValueError("The selected image loading mode is invalid")
if not "theme" in self.config["textui"]:
self.config["textui"]["theme"] = nomadnet.ui.TextUI.THEME_DARK
else:
@ -1400,6 +1414,15 @@ colormode = 24bit
# glyphs = unicode
glyphs = nerdfont
# If your terminal supports image output,
# the page browser can display images and
# graphics on pages. You can specify how,
# or if at all, images are loaded. Valid
# options are "auto", "manual", "never"
# and "always".
image_loading = auto
# You can specify whether mouse events
# should be considered as input to the
# application. On by default.