Git Product home page Git Product logo

lith's Introduction

Lith - Multiplatform WeeChat relay client

Lith is a project mostly focused on bringing a fast and user-friendly WeeChat client to all major desktop and mobile operating systems. The main focus of this project is to bring a full-featured native relay client to iOS but all major mobile and desktop platforms are supported to some degree.

Lith in Linux

Getting Started

Lith is a utility application for WeeChat (not to be confused with WeChat), a terminal chat application mostly focused on the IRC protocol. It is a only a graphical relay for messages that are actually received and sent by WeeChat. That means you need to prepare a WeeChat instance on on your computer or server (or have a provider do that for you) to be actually able to use Lith in any meaningful way.

For setup on the WeeChat side, please consult the following sources:

On desktop systems, you can run WeeChat on the same device as Lith but the main focus of this project is to handle remote connections, especially on mobile platforms and iOS in particular. The remote WeeChat server needs to be directly over the internet either through a TCP socket or WebSockets.

There is also a browser version of Lith you can try right now thanks to WebAssembly: https://lith.app/Lith/.

Features

  • Inline preview of images and videos
  • Fast buffer list filtering
  • Dark and light mode support
  • Native local notifications on desktop platforms
  • Secure storage of login credentials

Limitations

  • Message text is not selectable
  • Keyboard shortcuts can only be tweaked by editing the config file
  • Android: Builds are not tested at all at this moment, not signed, currently not installable without signing
  • macOS: Builds are not signed + Some keyboard shortcuts are broken
  • Windows: Builds are not signed + There is no installer
  • WebAssembly: Builds are pretty large (around 12MB at this moment), there are keyboard focus issues and video preview support is not supported.
  • More: https://github.com/LithApp/Lith/issues

Future plans

  • Full App Store release
  • Push notification support (first on iOS, then Android, probably)

Binary Packages

Lith currently supports the following platforms:

Build instructions

Lith is written using C++ and the Qt framework with QML. The only supported version is Qt 6.5 and newer. Other dependencies are listed below.

When building for all supported platforms, only the following steps should be necessary if CMake is setup correctly:

mkdir build && cd build
cmake ..
cmake --build .

Alternatively, you can just open the project file in Qt Creator.

There is also a package for Arch Linux in the AUR: https://aur.archlinux.org/packages/lith-git

Dependencies

Besides Qt, Lith currently depends on the packages listed below. You don't need to install them manually. This can be controlled, see the section below describing the CMake options to choose which packages to use.

Qt always needs to be installed outside of Lith's build system. Other dependencies are:

  • qtkeychain - Used to store login info (host, port, passphrase, ...).
  • QCoro - Simplifies programming asynchronous code with Qt C++ coroutine integration.
  • qhot - (Development only) Provides hot reload for QML, I use this to speed up UI feature development.

CMake options

  • LITH_FEATURE_KEYCHAIN - ON by default. Enables keychain integration on Linux, macOS, Windows, iOS and Android.
  • LITH_FEATURE_QHOT - OFF by default. Builds internal qhot instance and adds a target to automatically run Lith in qhot. Not useful for end users.
  • LITH_FORCE_DOWNLOAD_DEPENDENCIES - OFF by default. Makes CPM go for downloading packages from GitHub without checking local system. This option takes preference over LITH_FORCE_LOCAL_PACKAGES_ONLY.
  • LITH_FORCE_LOCAL_PACKAGES_ONLY - OFF by default. Enforces usage of only packages installed on local system.

Get in touch

For bug reports and questions, feel free to use the Issues page here on GitHub.

There's also an IRC channel: #lith on libera.chat (irc.libera.chat:6697 with SSL)

You can contact me directly on [email protected]

lith's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lith's Issues

Memory leak

Consistent. Just open and close the app

$ ./Lith 
Connecting
Connected!
=== RESET
There is 0 orphan lines
There is 0 hotlist items
qrc:/NickList.qml:43: TypeError: Cannot read property 'title' of null

=================================================================
==207878==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x556d31bdd352 in realloc (/home/vk/git/Lith/build/Lith+0x167352)
    #1 0x7fde5088369b  (/usr/lib/dri/radeonsi_dri.so+0x5c669b)

Indirect leak of 160 byte(s) in 1 object(s) allocated from:
    #0 0x556d31bdcfc9 in malloc (/home/vk/git/Lith/build/Lith+0x166fc9)
    #1 0x7fde5c826595 in QObjectPrivate::addConnection(int, QObjectPrivate::Connection*) (/usr/lib/libQt5Core.so.5+0x2dd595)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x556d31c12739 in operator new(unsigned long) (/home/vk/git/Lith/build/Lith+0x19c739)
    #1 0x7fde5c832745 in QObject::QObject(QObject*) (/usr/lib/libQt5Core.so.5+0x2e9745)
    #2 0x556d31c428a3 in main (/home/vk/git/Lith/build/Lith+0x1cc8a3)
    #3 0x7fde5bfb0151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x556d31c12739 in operator new(unsigned long) (/home/vk/git/Lith/build/Lith+0x19c739)
    #1 0x7fde5c82a927 in QObjectPrivate::connectImpl(QObject const*, int, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) (/usr/lib/libQt5Core.so.5+0x2e1927)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x556d31c12739 in operator new(unsigned long) (/home/vk/git/Lith/build/Lith+0x19c739)
    #1 0x7fde5c8263b7 in QObjectPrivate::addConnection(int, QObjectPrivate::Connection*) (/usr/lib/libQt5Core.so.5+0x2dd3b7)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x556d31c12739 in operator new(unsigned long) (/home/vk/git/Lith/build/Lith+0x19c739)
    #1 0x556d31c4288c in main (/home/vk/git/Lith/build/Lith+0x1cc88c)
    #2 0x7fde5bfb0151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

SUMMARY: AddressSanitizer: 656 byte(s) leaked in 6 allocation(s).

NickList: info about buffer

Hello.

  • Currently the text doesn't wrap.
  • Is it necessary to see the full name of the buffer in two places? Currently it's in the header of ChannelView and also in the NickList in it's full beauty (e.g. irc.freenode.org.#test.cz) consider only showing shortname in the ChannelView header?
  • Hide number of ops/voices/people when the current buffer is a query/plugin buffer/system buffer/server buffer - show something else in NickList for those? Or just hide the headcount

See screenshot for points no. 1 and 3
1509FC99-CA66-4125-87A9-2066B19627D4

Mobile: Scrollbar disappearing after a long time

When you scroll up and down a buffer the scrollbar appears, when you stop scrolling the scrollbar disappears after more than 2 seconds. This can be annoying when you want to press the "open picture" button while the scrollbar is visible as it is overlayed on top of the "open picture button" and therefore you click on the scrollbar and scroll up/down accidentally. This is more noticeable on small screens :^)

Embedded video bugs and feature reqs

  • Video doesn't stop or pause when Prwbiew closed

  • video pause button that's currently in the app just closes the preview

  • Video should be seekable maybe

  • Should be able to stop video and play from beginning again

All tested on mobile rn

Switch the color for current buffer on startup also; see #28

I failed.
See #28 for info (similar to #21)

Aka:
Since the last opened buffer is remembered and switched to upon startup & connect, the "highlighted buffer" in the bufferList should switch upon start up, not flash to the correct one only after user opens the bufferList.

Network/Entity stats

Add a way to track how many lines (and nicks too probably) are currently alive in each and all buffers - probably try to track orphans as well or just make sure to not create any.

  • Track network traffic

Text input bar option: global/local

Add an option so that the text input bar is either local to a buffer or global for all buffers.
This should be used for two things:

  1. If set to "local to a buffer": a message that's typed out, but not sent yet is saved for the specific buffer if a buffer is switched.
  2. History (either global for all buffers or local where every buffer keeps its own history)

segfault @ protocol.c:Protocol::convertColorsToHtml

Line 471
data = "�*|05~05c

image

This doesn't always happen (as you can see in the video it took a second try) but is reproducible quite a lot!
Do not test on a buffer you aren't afraid to clear, as this crashes the client (almost) everytime the buffer with the characters is opened.

Video (with steps to reproduce): http://povidam.ahoj.club/2020-11-15_23-33-33.mp4

Steps to write a bg+fg message: in weechat press: Ctrl-C then type: 3,3c

where "c" is any message you want to write with green text and green background

On an unrelated note: as you can see, even if it doesn't crash, the message gets mangled as I assume we don't parse background colors at all?

HEAD (or other approach) links to fetch Content-Type for video/image preview

  • ... and therefore determine whether to show the Preview button or Open the preview (if "open link directly" option=true)
  • Should probably be an option, also, since some people don't like giving out their IP to a server without actually opening the link.

Current state:

This could also be used for a limit of Content-Size that is allowed to be (which could be an option) previewed in the app. (Since .e.g a 500 MB video file might not be a good idea to open in Qt? (just guessing, dunno, really))

Cons of HEAD:

  • Slower
  • HEAD can be disabled/unsupported on the destination server, fallback to endswith(".jpeg|.jpg") etc. then

Any other ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.