Modules/README.MD
Шурупов Илья Викторович f58ec25520 Give every desktop app its own launcher and icon
Each window now announces a WindowIdentity (app id + title) instead of the
hardcoded "modules" app id, so GNOME/KDE can match a running window to its
.desktop launcher and show the right icon in the dock and app grid.

cmake/DesktopEntry.cmake is the single place an executable declares that
identity: modules_add_desktop_entry() compiles MODULES_APP_ID/NAME into the
target, generates <id>.desktop pointing at the built binary and stages the
icon into the hicolor theme layout. The install-desktop-entries target copies
them into ~/.local/share and refreshes the desktop database and icon cache.

Launchers: Sketch2D (reuses the Android launcher icon), Taskboard (new kanban
icon) and the generic Modules identity/icon used by the widget gallery and by
every application that has no entry of its own.
2026-10-26 00:54:27 +03:00

3.1 KiB

Modules

This repository started as a place for learning C++. Many modules were intentionally developed to gain a better understanding of a topic as opposed to using libraries. As time passes some modules gradually vanish due to my new experience and knowledge, and some grow.

  • Containers - a collection of implementations of well-known containers: Lists, Hash-Map, Trees, Interval Tree.
  • Math - Features some aspects of linear algebra (Matrix operations, vectors). For example, used by the RayTracer and Sketch3D module.
  • RayTracer - simple ray-tracer with object loader and lua configuration.
  • Objects (Python inspired) - encapsulates different types into Python-like objects. The module has its scripting language "Oscript" with support for methods, classes, pure functions, loops, conditions, etc. It uses compilation to bytecode and LALR parser. All objects can be saved and loaded at any time, whether it's a list or a method with bytecode. Some parts of this module have bad implementations and unstable code. Also, the module suffers from a lack of good testing.
  • Sketch3D - application with the ability to draw in 3D space. Features stroke processing and view-dependent shaders. Has lots of TODOs.
  • Data analysis - simple fully connected neural network (FCNN). Contains example application that is recognizing hand written numbers.

For more information on some modules see TODO and STATUS

Building

Check git actions if some libraries are missing.

To build and debug on windows clone svn repository (https://svn.riouxsvn.com/moduleswindowsl) alongside this repo and check WINDOWS_LIBRARIES option in cmake

Desktop launchers (Linux)

A desktop environment shows an application in its app grid and dock through a <id>.desktop file in $XDG_DATA_HOME/applications (default ~/.local/share/applications). Its Icon=<id> is looked up in the icon theme, so the icon goes to ~/.local/share/icons/hicolor/<size>/apps/<id>.png or hicolor/scalable/apps/<id>.svg. On Wayland the compositor matches a running window to its launcher by the window's xdg_toplevel app id, which must equal the .desktop file name (StartupWMClass is the X11 counterpart).

modules_add_desktop_entry() (cmake/DesktopEntry.cmake) declares that identity once per executable: it compiles MODULES_APP_ID / MODULES_APP_NAME into the target for its WindowIdentity, generates the .desktop file pointing at the built binary and stages the icon under <build>/desktop. Applications without their own entry use the generic online.ilushabasic.modules identity and icon (the widget gallery's launcher).

cmake --build <build> --target install-desktop-entries

copies the staged launchers and icons into MODULES_DESKTOP_DATA_HOME (default $XDG_DATA_HOME or ~/.local/share) and refreshes the desktop database and icon cache. The launchers run the binaries from that build directory.

Gallery

RayTracer Simple Ray-Tracer.

Oscript Oscript.

Sketch3d Sketch3D.