Skip to main content

OSD for wayland.

Project description

wlosd

An on-screen display for Wayland compositors.

You might also be interested in wledges which provides active edges for Wayland compositors.

Supported Desktops

Tested on Sway, but should work on all Wayland compositors that support the Layer Shell protocol. More precisely, it should work on all desktops supported by gtk4-layer-shell.

Installation

Dependencies:

Debian/Ubuntu:

sudo apt install libgirepository-1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0 libgtk4-layer-shell-dev
pip install pygobject

Fedora:

sudo dnf install gcc gobject-introspection-devel cairo-gobject-devel pkg-config python3-devel gtk4 gtk4-layer-shell-devel
pip install pygobject

Arch Linux:

sudo pacman -S python cairo pkgconf gobject-introspection gtk4 gcc gtk4-layer-shell
pip install pygobject

For other distributions, you will need:

Install wlosd:

From PyPi:

pip install wlosd

Or clone this repository.

Usage

wlosd reads commands from standard input. For example, run in a terminal:

wlosd
show --end-mark END test
Some text.
More text.
END

(don't kill the process yet)

This should display the two lines before END in the centre of the currently focused display, on top of all other windows. The text is transparent to all input events. If show is called with the --markup option, the text is interpreted as Pango markup ('<', '>' and '&' must be escaped as '&lt;', '&gt;', and '&amp;'). The --css command line argument (e.g. wlosd --css style.css) can be used to pass a GTK4 style sheet (see style.css for example, and overview and properties for documentation).

To hide the text:

hide test

To see all available commands:

help

To quit:

quit

A more useful way to run wlosd would be to put something along the following lines somewhere in your startup scripts:

rm -f "${XDG_RUNTIME_DIR}/wlosdpipe"
mkfifo "${XDG_RUNTIME_DIR}/wlosdpipe"
tail -fn+1 "${XDG_RUNTIME_DIR}/wlosdpipe" | wlosd &

And send commands to wlosd like this:

printf -- 'show --end-mark END test\nSome text.\nEND\n' > "${XDG_RUNTIME_DIR}/wlosdpipe"

License

MIT, see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wlosd-1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wlosd-1.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file wlosd-1.1.tar.gz.

File metadata

  • Download URL: wlosd-1.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wlosd-1.1.tar.gz
Algorithm Hash digest
SHA256 95e80c1d0818deeb099d76b16d72a736b034b7b3f98c94cd718cea8be2d66a2e
MD5 9a6664eb2f3cd3d9ca46a421e62d797d
BLAKE2b-256 2c9fb86d984aac2a4753199e670991142b04e29a0d47c6ff275775020b3d3b12

See more details on using hashes here.

File details

Details for the file wlosd-1.1-py3-none-any.whl.

File metadata

  • Download URL: wlosd-1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for wlosd-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7f110c0d775cd3f62e9ef566a656c4fe67eacf6ebb36ed7434a3b3d7f66f589
MD5 7ddb687df7a9d4c6a156811a2d575aab
BLAKE2b-256 95b7e2ed80a6794cdd19489dab92c6fa33e311f48300d5cbcf8d1926db440dd1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page