feat/color-pick #30

Merged
genewildish merged 12 commits from feat/color-pick into main 2026-03-16 10:13:48 +00:00
4 changed files with 12 additions and 5 deletions
Showing only changes of commit bc20a35ea9 - Show all commits

View File

@@ -75,7 +75,9 @@ def _draw_color_picker(themes_list, selected):
print(CLR, end="") print(CLR, end="")
print() print()
print(f" {G_HI}▼ COLOR THEME{RST} {W_GHOST}─ ↑/↓ or j/k to move, Enter/q to select{RST}") print(
f" {G_HI}▼ COLOR THEME{RST} {W_GHOST}─ ↑/↓ or j/k to move, Enter/q to select{RST}"
)
print(f" {W_GHOST}{'' * (tw() - 4)}{RST}\n") print(f" {W_GHOST}{'' * (tw() - 4)}{RST}\n")
for i, (theme_id, theme) in enumerate(themes_list): for i, (theme_id, theme) in enumerate(themes_list):
@@ -365,6 +367,7 @@ def main():
save_cache(items) save_cache(items)
elif config.MODE == "code": elif config.MODE == "code":
from engine.fetch_code import fetch_code from engine.fetch_code import fetch_code
slow_print(" > INITIALIZING SOURCE ARRAY...\n") slow_print(" > INITIALIZING SOURCE ARRAY...\n")
time.sleep(0.2) time.sleep(0.2)
print() print()

View File

@@ -58,8 +58,10 @@ HEADLINE_LIMIT = 1000
FEED_TIMEOUT = 10 FEED_TIMEOUT = 10
MIC_THRESHOLD_DB = 50 # dB above which glitches intensify MIC_THRESHOLD_DB = 50 # dB above which glitches intensify
MODE = ( MODE = (
"poetry" if "--poetry" in sys.argv or "-p" in sys.argv "poetry"
else "code" if "--code" in sys.argv if "--poetry" in sys.argv or "-p" in sys.argv
else "code"
if "--code" in sys.argv
else "news" else "news"
) )
FIREHOSE = "--firehose" in sys.argv FIREHOSE = "--firehose" in sys.argv

View File

@@ -15,6 +15,7 @@ from engine.sources import NO_UPPER, SCRIPT_FONTS, SOURCE_LANGS
from engine.terminal import RST from engine.terminal import RST
from engine.translate import detect_location_language, translate_headline from engine.translate import detect_location_language, translate_headline
# ─── GRADIENT ───────────────────────────────────────────── # ─── GRADIENT ─────────────────────────────────────────────
def _color_codes_to_ansi(color_codes): def _color_codes_to_ansi(color_codes):
"""Convert a list of 256-color codes to ANSI escape code strings. """Convert a list of 256-color codes to ANSI escape code strings.
@@ -80,6 +81,7 @@ def _default_magenta_gradient():
"\033[2;38;5;235m", # near black "\033[2;38;5;235m", # near black
] ]
# ─── FONT LOADING ───────────────────────────────────────── # ─── FONT LOADING ─────────────────────────────────────────
_FONT_OBJ = None _FONT_OBJ = None
_FONT_OBJ_KEY = None _FONT_OBJ_KEY = None

View File

@@ -18,7 +18,7 @@ from engine.effects import (
noise, noise,
vis_trunc, vis_trunc,
) )
from engine.render import big_wrap, lr_gradient, msg_gradient, make_block from engine.render import big_wrap, lr_gradient, make_block, msg_gradient
from engine.terminal import CLR, RST, W_COOL, th, tw from engine.terminal import CLR, RST, W_COOL, th, tw