# wlosd
An on-screen display for Wayland compositors.
You might also be interested in [wledges](https://github.com/fshaked/wledges)
which provides active edges for Wayland compositors.
## Supported Desktops
Tested on [Sway](https://swaywm.org/), but should work on all Wayland
compositors that support the Layer Shell protocol. More precisely,
it should work on all
[desktops supported](https://github.com/wmww/gtk4-layer-shell?tab=readme-ov-file#supported-desktops)
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:
- Python 3: [instructions](https://wiki.python.org/moin/BeginnersGuide/Download)
- pygobject: [instructions](https://pygobject.gnome.org/getting_started.html)
- gtk4-layer-shell: [instructions](https://github.com/wmww/gtk4-layer-shell)
### 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](https://docs.gtk.org/Pango/pango_markup.html)
('<', '>' and '&' must be escaped as '<', '>', and '&').
The `--css` command line argument (e.g. `wlosd --css style.css`) can be used to
pass a GTK4 style sheet (see
[style.css](https://github.com/fshaked/wlosd/blob/main/style.css) for example,
and [overview](https://docs.gtk.org/gtk4/css-overview.html) and
[properties](https://docs.gtk.org/gtk4/css-properties.html) 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](https://github.com/fshaked/wlosd/blob/main/LICENSE)
Raw data
{
"_id": null,
"home_page": null,
"name": "wlosd",
"maintainer": "Shaked Flur",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "OSD, wayland, sway, layer-shell, wlr, wlroots",
"author": "Shaked Flur",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fb/19/652ebd0971cac01faa8572dacab2be42e98cdaaf57376ab25b746b820623/wlosd-1.tar.gz",
"platform": null,
"description": "# wlosd\n\nAn on-screen display for Wayland compositors.\n\nYou might also be interested in [wledges](https://github.com/fshaked/wledges)\nwhich provides active edges for Wayland compositors.\n\n## Supported Desktops\n\nTested on [Sway](https://swaywm.org/), but should work on all Wayland\ncompositors that support the Layer Shell protocol. More precisely,\nit should work on all\n[desktops supported](https://github.com/wmww/gtk4-layer-shell?tab=readme-ov-file#supported-desktops)\nby gtk4-layer-shell.\n\n## Installation\n\n### Dependencies:\n\nDebian/Ubuntu:\n\n```\nsudo apt install libgirepository-1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0 libgtk4-layer-shell-dev\npip install pygobject\n```\n\nFedora:\n\n```\nsudo dnf install gcc gobject-introspection-devel cairo-gobject-devel pkg-config python3-devel gtk4 gtk4-layer-shell-devel\npip install pygobject\n```\n\nArch Linux:\n\n```\nsudo pacman -S python cairo pkgconf gobject-introspection gtk4 gcc gtk4-layer-shell\npip install pygobject\n```\n\nFor other distributions, you will need:\n- Python 3: [instructions](https://wiki.python.org/moin/BeginnersGuide/Download)\n- pygobject: [instructions](https://pygobject.gnome.org/getting_started.html)\n- gtk4-layer-shell: [instructions](https://github.com/wmww/gtk4-layer-shell)\n\n### Install wlosd:\nFrom PyPi:\n```\npip install wlosd\n```\n\nOr clone this repository.\n\n## Usage\n\nwlosd reads commands from standard input. For example, run in a terminal:\n\n```\nwlosd\nshow --end-mark END test\nSome text.\nMore text.\nEND\n```\n(don't kill the process yet)\n\nThis should display the two lines before `END` in the centre of the currently\nfocused display, on top of all other windows. The text is transparent to all\ninput events. If show is called with the `--markup` option, the text is\ninterpreted as [Pango markup](https://docs.gtk.org/Pango/pango_markup.html)\n('<', '>' and '&' must be escaped as '<', '>', and '&').\nThe `--css` command line argument (e.g. `wlosd --css style.css`) can be used to\npass a GTK4 style sheet (see\n[style.css](https://github.com/fshaked/wlosd/blob/main/style.css) for example,\nand [overview](https://docs.gtk.org/gtk4/css-overview.html) and\n[properties](https://docs.gtk.org/gtk4/css-properties.html) for documentation).\n\nTo hide the text:\n\n```\nhide test\n```\n\nTo see all available commands:\n\n```\nhelp\n```\n\nTo quit:\n\n```\nquit\n```\n\nA more useful way to run wlosd would be to put something along the following\nlines somewhere in your startup scripts:\n\n```\nrm -f \"${XDG_RUNTIME_DIR}/wlosdpipe\"\nmkfifo \"${XDG_RUNTIME_DIR}/wlosdpipe\"\ntail -fn+1 \"${XDG_RUNTIME_DIR}/wlosdpipe\" | wlosd &\n```\n\nAnd send commands to wlosd like this:\n\n```\nprintf -- 'show --end-mark END test\\nSome text.\\nEND\\n' > \"${XDG_RUNTIME_DIR}/wlosdpipe\"\n```\n\n## License\n\nMIT, see [LICENSE](https://github.com/fshaked/wlosd/blob/main/LICENSE)\n",
"bugtrack_url": null,
"license": null,
"summary": "OSD for wayland.",
"version": "1",
"project_urls": {
"Changelog": "https://github.com/fshaked/wlosd/CHANGELOG.md",
"Documentation": "https://github.com/fshaked/wlosd",
"Homepage": "https://github.com/fshaked/wlosd",
"Issues": "https://github.com/fshaked/wlosd/issues",
"Repository": "https://github.com/fshaked/wlosd.git"
},
"split_keywords": [
"osd",
" wayland",
" sway",
" layer-shell",
" wlr",
" wlroots"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0c502adfb61319ba2e348e7dd39231c30c377a4c4b6fde262955691fca659e8f",
"md5": "edffbe6b906079c0829eece24b8cf185",
"sha256": "1fb5499c130a8317907607bdd4657bb8cad7aa7f62c37b25a39f289889227cb2"
},
"downloads": -1,
"filename": "wlosd-1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "edffbe6b906079c0829eece24b8cf185",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8273,
"upload_time": "2024-12-22T10:33:59",
"upload_time_iso_8601": "2024-12-22T10:33:59.987779Z",
"url": "https://files.pythonhosted.org/packages/0c/50/2adfb61319ba2e348e7dd39231c30c377a4c4b6fde262955691fca659e8f/wlosd-1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fb19652ebd0971cac01faa8572dacab2be42e98cdaaf57376ab25b746b820623",
"md5": "4c67e59214971690c4f2e4e5b74a0b20",
"sha256": "f0f135e636656039028c0f1f4bb7d0ed9025d00b59266e5576b1cd3cbd18fbd2"
},
"downloads": -1,
"filename": "wlosd-1.tar.gz",
"has_sig": false,
"md5_digest": "4c67e59214971690c4f2e4e5b74a0b20",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 9262,
"upload_time": "2024-12-22T10:34:02",
"upload_time_iso_8601": "2024-12-22T10:34:02.042818Z",
"url": "https://files.pythonhosted.org/packages/fb/19/652ebd0971cac01faa8572dacab2be42e98cdaaf57376ab25b746b820623/wlosd-1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-22 10:34:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fshaked",
"github_project": "wlosd",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pycairo",
"specs": [
[
"==",
"1.27.0"
]
]
},
{
"name": "PyGObject",
"specs": [
[
"==",
"3.50.0"
]
]
}
],
"lcname": "wlosd"
}