View previous topic :: View next topic |
Author |
Message |
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2675
|
Posted: Fri Jan 31, 2025 10:47 am Post subject: Wayland OSD clock? |
|
|
I'm looking for something that will be on my screen but will be transparent and not take focus to show me the time and maybe some other notifications, but most importantly, time. I don't want status bars and similar. Currently I have a keybind in Hyprland to invoke SwayOSD that displays the output of date as an OSD message but I don't find that very convenient.
Can somebody point me to something that supports Wayland? Or give me an idea how to achieve that?
Best Regards,
Georgi |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3911 Location: Rasi, Finland
|
Posted: Fri Jan 31, 2025 11:30 am Post subject: Re: Wayland OSD clock? |
|
|
logrusx wrote: | I don't want status bars and similar. | Maybe not the answer you're looking for, but yambar is very light on resources. Maybe you could configure it so that it only displays time? _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2675
|
Posted: Fri Jan 31, 2025 11:43 am Post subject: Re: Wayland OSD clock? |
|
|
Zucca wrote: | logrusx wrote: | I don't want status bars and similar. | Maybe not the answer you're looking for, but yambar is very light on resources. Maybe you could configure it so that it only displays time? |
Thanks, I'll check it out. In the mean time I found this:
https://git.sr.ht/~proycon/wayout
It works like that:
Code: | while :; do date +%H:%M:%S; sleep 1; done | wayout --feed-line --layer overlay & |
I'm still tinkering with it, but exec-once of the above line in hyprland.conf should suffice. If I figure out how to position it where I want it... :)
And you can find it packaged here, if you're interested: https://github.com/logrusx/gentoo/tree/master/gui-apps/wayout
Best Regards,
Georgi |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3911 Location: Rasi, Finland
|
Posted: Fri Jan 31, 2025 11:53 am Post subject: |
|
|
Nice.
I could use wayout to display cal -w3m output instead of a terminal window. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2675
|
Posted: Fri Jan 31, 2025 12:28 pm Post subject: |
|
|
Zucca wrote: | Nice.
I could use wayout to display cal -w3m output instead of a terminal window. |
Unfortunately only predefined locations are available: top, bottom, left, right and their corresponding combinations. Also something like color inversion or blurring is not available so sometimes the text won't be visible depending on the background.
Best Regards,
Georgi |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3911 Location: Rasi, Finland
|
Posted: Fri Jan 31, 2025 12:47 pm Post subject: |
|
|
I think I could give it a try anyways. Doesn't hurt to test it. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2675
|
Posted: Fri Jan 31, 2025 1:07 pm Post subject: |
|
|
Choose the appropriate layer. For me it's top or overlay as be it fixed poisons, it still allows me to put it over windows headers and I want to see it all the time. For you it might be appropriate not to alter it if you want to just trigger it by a hot key on an empty screen. Otherwise it's going to cover a lot of what you're doing.
Best Regards,
Georgi |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6214 Location: Dallas area
|
Posted: Fri Jan 31, 2025 4:28 pm Post subject: |
|
|
You want a clock or just the time?
If time there are a couple of scripts that wrap commands and allow positioning, opacity, font color, layer, how ofter to run, etc of the output.
I use nwg-wrapper https://github.com/nwg-piotr/nwg-wrapper, but there are others. _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2675
|
Posted: Fri Jan 31, 2025 5:36 pm Post subject: |
|
|
Anon-E-moose wrote: | You want a clock or just the time? |
Nailed it!
Anon-E-moose wrote: | If time there are a couple of scripts that wrap commands and allow positioning, opacity, font color, layer, how ofter to run, etc of the output.
I use nwg-wrapper https://github.com/nwg-piotr/nwg-wrapper, but there are others. |
Just on time: I'm growing annoyed with wayout's limited functionality. Thanks!
Best Regards,
Georgi
Last edited by logrusx on Fri Jan 31, 2025 5:59 pm; edited 1 time in total |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3911 Location: Rasi, Finland
|
Posted: Fri Jan 31, 2025 5:40 pm Post subject: |
|
|
Anon-E-moose wrote: | I use nwg-wrapper | BINGO!
That's a perfect tool for doing a single thing. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2675
|
Posted: Fri Jan 31, 2025 6:19 pm Post subject: |
|
|
I'm not clear on how to run that thing, let alone package it. Any directions? I'm not a python user.
EDIT: well, simplicity is actually wayout's strength. I've set it up to do a satisfactory job for me and for now I'm staying with it. Nwg-wrapper is giving me trouble with that I don't know python, setuptools and whatever is necessary to run it.
Best Regards,
Georgi |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6214 Location: Dallas area
|
Posted: Fri Jan 31, 2025 7:52 pm Post subject: |
|
|
I have a few files in .config/nwg-wrapper
Code: | ~/.config/nwg-wrapper $ cat winfo.css
window {
background-color: rgba (0, 0, 0, 0.0);
}
#box-outer {
/* Define attributes of the box surrounding icons here */
background-color: rgba (255, 255, 255, 0.0);
}
#box-inner {
background-color: rgba (0, 0, 0, 0.7);
} |
alpha channel allows for opacity
Code: | ~/.config/nwg-wrapper $ cat winfo.sh
#!/bin/bash
info=$(lswt | sed -e 's/&/and/g' -e 's/</lt/g' -e 's/>/gt/g' -e 's/ — Mozilla Firefox//')
echo '<span size="20000" face="monospace" foreground="#ffff00">'"$info"'</span>' |
regular shell script, output from command is used in echo statement for coloring, etc
I put this in my autoconf file
Code: | nwg-wrapper -s /home/don/.config/nwg-wrapper/winfo.sh -c /home/don/.config/nwg-wrapper/winfo.css -r 1000 -p left -a start -mt 40 -ml 10 & |
-s is script to execute, -c is .css file, -r 1000 m.sec (1 sec), -p and -a is top left, -mt and -mi are offsets, 40 and 10 pixels respectively. _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6214 Location: Dallas area
|
Posted: Fri Jan 31, 2025 7:53 pm Post subject: |
|
|
Code: | /usr/local/portage/gui-apps/nwg-wrapper $ cat nwg-wrapper-9999.ebuild
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{10..11} )
DISTUTILS_USE_PEP517=setuptools
inherit desktop distutils-r1 xdg-utils
if [[ "${PV}" == 9999 ]]
then
inherit git-r3
EGIT_REPO_URI="https://github.com/nwg-piotr/nwg-wrapper.git"
else
SRC_URI="https://github.com/nwg-piotr/nwg-wrapper/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
DESCRIPTION="GTK3-based wrapper to display data to layer-shell window"
HOMEPAGE="https://github.com/nwg-piotr/nwg-wrapper"
LICENSE="MIT"
SLOT="0"
RDEPEND="
gui-libs/gtk-layer-shell
x11-libs/gtk+:3
dev-python/pygobject[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
python_install_all() {
distutils-r1_python_install_all
} |
_________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6214 Location: Dallas area
|
Posted: Fri Jan 31, 2025 7:57 pm Post subject: |
|
|
There's also wtw https://github.com/apprehensions/wtw
not as pretty as nwg-wrapper, color wise, but similar output ability.
Code: | To build wtw first ensure that you have the following dependencies:
* wayland
* wayland-protocols
* fcft
* pixman
* pkg-config
Afterwards, run:
```
make
make install
```
## Usage
When using wtw, ensure you guard the command-line arguments with '--'.
Example usage:
```
wtw -b 181716aa -c ebdbb2ff -p 10 -x 20 -y 20 -- pstree -U |
_________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2675
|
Posted: Fri Jan 31, 2025 8:16 pm Post subject: |
|
|
OK, thank you for all the valuable information you've shared! I'm done for the week and will get back to it next week. Have a good weekend!
Best Regards,
Georgi |
|
Back to top |
|
|
|