A simple nakenchat client built in C.
** Checkout my android client nakenChat
I tried to separate the user interface from the main routines logic in my previous client, and got to cnctty.
- Client is written entirely with basic terminal control library
termiosandansiescape codes for colors. - Custom widgets based UI, having three component: a display that holds messages history, an infobar showing basic status information, and a prompt for user input.
- Automatic selection of username and password at startup.
- New control commands starting with semi-colon.
- Vim-like motion control for scrolling the display or moving inside the prompt:
- C compiler. This project was developed using gcc on Linux.
- openssl development library.
- crypto development library
$ git clone --recurse-submodules https://github.com/panv-00/cnctty.git
...
$ cd cnctty
...
$ make
make[1]: Entering directory './cnctty/build'
gcc -o ../cnctty ../src/cnctty.c \
cnc_library.o cnc_net.o cnc_message.o \
-Wall -O3 -g -lssl -lcrypto -pthread \
make[1]: Leaving directory './cnctty/build'
# now you can run with:
$ ./cnctty
# or
$ ./cnctty --version
# display version number and exit
# copy this executable anywhere you like (i.e. ~/.bin or ~/.local/bin)key shortcuts
| Mode | key | Widget | Action |
|---|---|---|---|
| INSERT | ESC | any | Switch to CMD mode |
| INSERT | Ctrl + c | any | Switch to CMD mode |
| INSERT | LEFT | PROMPT | Move cursor left |
| INSERT | RIGHT | PROMPT | Move cursor right |
| CMD | INS | any | Switch to INSERT mode |
| CMD | i | any | Switch to INSERT mode |
| CMD | a | PROMPT | Append in INSERT mode |
| CMD | A | PROMPT | Append end in INSERT mode |
| CMD | 0 | PROMPT | Move cursor to beginning |
| CMD | $ | PROMPT | Move cursor to end |
| CMD | k | DISPLAY | Scroll up |
| CMD | j | DISPLAY | Scroll down |
| CMD | l | PROMPT | Move cursor right |
| CMD | h | PROMPT | Move cursor left |
| CMD | e | PROMPT | Move word right |
| CMD | b | PROMPT | Move word left |
| CMD | 0 | DISPLAY | Scroll to first |
| CMD | $ | DISPLAY | Scroll to last |
| CMD | x | PROMPT | Delete under cursor |
| CMD | PAGE UP | DISPLAY | Scroll one page up |
| CMD | PAGE DOWN | DISPLAY | Scroll one page down |
PROMPT commands
| Mode | Command | Action |
|---|---|---|
| INSERT | :q |
quit |
| INSERT | :c |
connect to server |
| INSERT | :d |
disconnect |
This project is licensed under the MIT License - see the LICENSE file for details.