Skip to content

panv-00/cnctty

Repository files navigation

cnctty

A simple nakenchat client built in C.

About

I tried to separate the user interface from the main routines logic in my previous client, and got to cnctty.

Features

  • Client is written entirely with basic terminal control library termios and ansi escape 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:

Getting Started

Prerequisites

  • C compiler. This project was developed using gcc on Linux.
  • openssl development library.
  • crypto development library

Building

$ 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)

Basic Usage

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 :Q quit
INSERT :c connect to server
INSERT :C connect to server
INSERT :d disconnect
INSERT :D disconnect
CMD q quit
CMD Q quit
CMD c connect to server
CMD C connect to server
CMD d disconnect
CMD D disconnect

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published