toot
toot copied to clipboard
Implement user-configurable TUI settings
Some things which could be configurable:
- palette
- symbols for favourite, reblog & reply - some fonts might not have the default ones
- app for viewing media
An alternative implementation of opening media would be to download the media file(s) to /tmp and use xdg-open
for Linux, open
for Mac and start
for Windows. I can help, but only if you think it would be a good solution
A simple example
def show_media(paths):
viewer = None
potential_viewers = [
"xdg-open"
]
for v in potential_viewers:
viewer = shutil.which(v)
if viewer:
break
if not viewer:
raise Exception("Cannot find an image viewer")
for path in paths:
req = requests.get(path)
if req.status_code != 200:
continue
tp = tempfile.mkstemp(prefix='toot-')
with open(tp[1], 'wb') as f:
f.write(req.content)
subprocess.run(['xdg-open', tp[1]])
os.remove(tp[1])
as a colemak user, also keyboard shortcuts
Just chiming in to say that I would appreciate an xdg integration. Also a setting for the default timeline (local, global, notifications) to be loaded on startup would be great.
On Tue, May 09, 2023 at 11:00:36PM -0700, Clemens Scott wrote:
Just chiming in to say that I would appreciate an xdg integration.
+1 from me too.
Work started: https://toot.bezdomni.net/settings.html
Need to add more TUI config options, so leaving the issue open.