chatty: The terminal chat application
Overview
chatty
is a terminal chat application.
Included is also a server.
Client features
- users are saved
- you can send messages
- you can pause and resume with
Ctrl-Z
and thefg
command - messages can have basic markdown formatting
- basic shortcuts for editing the message
- reconnecting on
Shortcuts
Ctrl+C
|Ctrl+D
: quitsCtrl+U
: Erase input lineCtrl+W
: Erase word behind cursorCtrl+Y
: Paste clipboard into input field
Server features
- multiple users
- recovering on invalid messages
- send "connected"/"disconnected" messages to other clients
Build
Run the build script.
./source/build.sh
Try it out
Run the server with
./build/server
You can stop it with
Ctrl-D
In another prompt, start a client with
./build/chatty Poulbi
Resources
- Terminal library: Termbox2
- Source code I looked at:
- https://github.com/git-bruh/matrix-tui
- https://github.com/NikitaIvanovV/ictree
- mmap & gdb: Tsoding - "Why linux has this syscall?"
- pthreads: C for dummies
- unicode and wide characters: C for dummies
- sockets: Nir Lichtman - Making Minimalist Chat Server in C on Linux
- Syscall manpages
man
- Compression: Casey Muratori - Simple RLE Compressor