-
Notifications
You must be signed in to change notification settings - Fork 107
libchafa API demo: view X11 window in terminal #298
-
I felt like playing some games and watching movie in terminal so I made a program to watch any x11 window (by ID) in current terminal.
x11_to_chafa c
It's been working for me and it'd be nice if someone else might enjoy it. I watched half of Barton Fink in 160x50 xterm with block-braille rendering. .. surreal
gcc -Os -o x11_to_chafa x11_to_chafa.c -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/local/include/chafa -I/usr/local/lib/chafa/include -L/usr/local/lib -I./stb -lchafa -lX11 -lXext -lXcomposite -lm -lglib-2.0 -lz
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
YMMV: if your font has dot-braille (like most do) ⢰ ⢱ ⢲ ⢳ ⢴ ⢵ ⢶ ⢷ ⢸ ⢹ ⢺ ⢻ ⢼ it will look not-so-good.
SOLUTION: link your font here and if it's a bitmap font i'll fix it to have block-braille characters.
bbb_chafa
TODO(?)
- Pass through terminal keypresses (or X11 keyboard events) to target X11 program.
- Bridge to ssh/telnet daemon (or make it user's login program)
- Map ssh keyboard input to game controller 2
Beta Was this translation helpful? Give feedback.