This is port of the idea of EDMC Overlay to the Linux.
Only API is ported, everything else is made from scratch. This repo supports X11 only yet.
- Added ability to show/hide overlay by 1 click in the main EDMC window, which can be used for the screenshots.
- Added basic "command" support compatible with Windows' version.
- Added ability to detect if EliteDangerous is top window (has input focus) and hide overlay if not.
- TTF fonts are supported.
- Added ability to draw SVG images on overlay.
- Now user can configure "normal"/"large" fonts' sizes from EDMC settings. Single config for all plugins and font-size per installed EDMC's plugin are supported.
- Added check if this plugin's folder is properly named
edmcoverlay
orEDMCOverlay
. It will crash if not. Note, either of those 2 namings may break some other plugins. As authors of those use both. That should be addressed by broken plugins. Good loading code is present into EDMC-BioScan :
try:
from EDMCOverlay import edmcoverlay
except ImportError:
try:
from edmcoverlay import edmcoverlay
except ImportError:
edmcoverlay = None
- Added WM_CLASS set to
edmc_linux_overlay_class
for the overlay window. - Added Cairo to draw the shapes (if found installed in the system).
- Added multiline support. Now binary replaces '\t' with fixed amount of the spaces and properly handles '\n' accounting current font used. Python object got method
is_multiline_supported()
. It can be tested by other plugins as:
def supports_multiline(obj) -> bool:
return (
hasattr(obj, "is_multiline_supported")
and callable(getattr(obj, "is_multiline_supported"))
and obj.is_multiline_supported()
)
Bioscan's radar with Cairo:
You can send SVG picture using overlay's method:
overlay.send_svg(
svgid="logo",
svg=tux_svg,
css="",
x=50,
y=270,
ttl=10,
font_file='',
)
Where svg
is full text of the svg, css
is dynamic CSS to apply, x/y will be left-top corner of the image, dimensions are taken out of SVG itself. font_file
- if you don't like default fonts used, you can give here absolute path on disk to the font file. It can be repeated many times, it will be loaded only once.
Method is_svg_supported()
is added too, and can be used similar to multiline detection:
def supports_svg(obj) -> bool:
return (
hasattr(obj, "is_svg_supported")
and callable(getattr(obj, "is_svg_supported"))
and obj.is_svg_supported()
)
lunasvg
is used to render, so details about supported tags you can find there: https://github.com/sammycage/lunasvg
- Clone the repo into your EDMC plugins' directory
- NB: you must name the directory
edmcoverlay
, notedmcoverlay_for_linux
. You may clone repo elsewhere and symlink it asedmcoverlay
to the plugins' directory. This is required because all other plugins use this name to access overlay (some are usingEDMCOverlay
naming too).
- NB: you must name the directory
- Install the dependencies (mostly X11 development headers; on Ubuntu,
the
xorg-dev
package may be sufficient),cmake
. - Run script
create_binary.sh
it will handle all needed. - In the EDMC settings, configure the size and position of the overlay, default fonts' sizes, sizes per plugin.
Full list of libraries used check into cpp/CMakeLists.txt
. Those must be pre-installed in system before running compilation.
EDMCOverlay for Linux aims to be 100% compatible with EDMC Overlay.
Python library is a wrapper to pass json to the compiled binary. Compiled binary can be used stand-alone for any other purposes as overlay. Binary listens on port 5010.
Copyright © 2020 Ash Holland. Licensed under the GPL (version 3 only).
Copyright © 2021-2024 Oleksiy Zakharov. Licensed under the GPL (version 3 only).
edmcoverlay2 is heavily based on X11 overlay by @ericek111 (GPLv3).
Additionally, parts of edmcoverlay2 are copied from other projects:
- gason (MIT)
- lib_netsockets (Apache 2.0)
edmcoverlay2 would not exist without them.
Copyright notices can be found in the relevant source files.